JsonHelper.h 470 B

12345678910111213141516171819202122
  1. /*
  2. * JsonHelper.h
  3. *
  4. * Created on: Aug 19, 2017
  5. * Author: guoxs
  6. */
  7. #ifndef _UTILS_JSON_HELPER_H_
  8. #define _UTILS_JSON_HELPER_H_
  9. #include "json/json.h"
  10. using namespace std;
  11. class JsonHelper {
  12. public:
  13. static bool readJsonFile(const char *pJsonFile, Json::Value &json);
  14. static bool readJsonData(const char *pData, int len, Json::Value &json);
  15. static bool writeJsonFile(const char *pJsonFile, const Json::Value &json);
  16. };
  17. #endif /* _UTILS_JSON_HELPER_H_ */