Lines Matching full:json
21 #include "nlohmann/json.hpp"
31 * @brief load json value from file
33 * @param jsonValue json value from the file content
37 static bool LoadJsonValueFromFile(nlohmann::json& jsonValue, const std::string& filePath);
40 * @brief load json value from string
42 * @param jsonValue json value from the string
46 static bool LoadJsonValueFromContent(nlohmann::json& jsonValue, const std::string& content);
49 * @brief dump json value to file
51 * @param jsonValue json value to be dumped to the file
52 * @param filePath the absolute file path to dump json value
55 static bool DumpJsonValueToFile(const nlohmann::json& jsonValue, const std::string& filePath);
58 * @brief get the 32-bit int from json value object
60 * @param jsonValue json object
65 static bool GetInt32FromJsonValue(const nlohmann::json& jsonValue, const std::string& key, int32_t& value);
68 * @brief get the bool from json value object
70 * @param jsonValue json object
75 static bool GetBoolFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, bool& value);
78 * @brief get the string from json value object
80 * @param jsonValue json object
85 static bool GetStringFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, std::string& value);
88 * @brief Get the Obj from json value object
90 * @param jsonValue json object
91 * @param key the name of json object
95 static bool GetObjFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, nlohmann::json& value);
98 * @brief Get the Array from json value object
100 * @param jsonValue json object
105 static bool GetArrayFromJsonValue(const nlohmann::json& jsonValue, const std::string& key, nlohmann::json& value);
108 * @brief Get the String Array from json value object
110 * @param jsonValue json object
115 static bool GetStrArrFromJsonValue(const nlohmann::json& jsonValue, const std::string& key,