helpers.cpp: Add new functions

- readFile()
 - parseJsonFromFile()
 - parseJsonFromString()

 parseJsonFromString() and parseJsonFromFile() use Json::CharReader
 instead of the obsolete function Json::Reader


Origin commit data
------------------
Branch: ni/coolstream
Commit: 05d8ed4105
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-09-19 (Tue, 19 Sep 2017)

Origin message was:
------------------
helpers.cpp: Add new functions

 - readFile()
 - parseJsonFromFile()
 - parseJsonFromString()

 parseJsonFromString() and parseJsonFromFile() use Json::CharReader
 instead of the obsolete function Json::Reader


------------------
This commit was generated by Migit
This commit is contained in:
Michael Liebmann
2017-09-19 21:38:38 +02:00
parent 8296b29529
commit fa80597608
3 changed files with 83 additions and 0 deletions

View File

@@ -152,4 +152,6 @@ std::string filehash(const char * file);
std::string get_path(const char * path);
inline bool file_exists(const std::string file) { return file_exists(file.c_str()); }
std::string readFile(std::string file);
#endif