This module is a lightweight wrapper for nlohmann::json, designed for extracting values from a JSON object.
More...
|
| bool | fetch_json_string_node (const nlohmann::json &root, const std::string &node_name, std::string &value, std::string &err_msg) |
| | Extract a string from a JSON object.
|
| |
| bool | fetch_json_int_node (const nlohmann::json &root, const std::string &node_name, int &value, std::string &err_msg) |
| | Extract an integer from a JSON object.
|
| |
| bool | fetch_json_bool_node (const nlohmann::json &root, const std::string &node_name, bool &value, std::string &err_msg) |
| | Extract a boolean value from a JSON object.
|
| |
| bool | fetch_json_long_node (const nlohmann::json &root, const std::string &node_name, long &value, std::string &err_msg) |
| | Extract a long integer from a JSON object.
|
| |
| bool | fetch_json_array_node (const nlohmann::json &root, const std::string &node_name, nlohmann::json &value, std::string &err_msg) |
| | Extract a json array from a JSON object.
|
| |
| bool | fetch_json_object_node (const nlohmann::json &root, const std::string &node_name, nlohmann::json &value, std::string &err_msg) |
| | Extract a json object from a JSON object.
|
| |
This module is a lightweight wrapper for nlohmann::json, designed for extracting values from a JSON object.
◆ fetch_json_array_node()
| bool ssgx::json_t::fetch_json_array_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
nlohmann::json & | value, |
|
|
std::string & | err_msg ) |
Extract a json array from a JSON object.
- Parameters
-
| [in] | root | json object |
| [in] | node_name | key in a JSON object |
| [out] | value | value in a JSON object |
| [out] | err_msg | error message |
- Returns
- Return true if successful; otherwise, return false
◆ fetch_json_bool_node()
| bool ssgx::json_t::fetch_json_bool_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
bool & | value, |
|
|
std::string & | err_msg ) |
Extract a boolean value from a JSON object.
- Parameters
-
| [in] | root | |
| [in] | node_name | |
| [out] | value | |
| [out] | err_msg | |
- Returns
- Return true if successful; otherwise, return false
◆ fetch_json_int_node()
| bool ssgx::json_t::fetch_json_int_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
int & | value, |
|
|
std::string & | err_msg ) |
Extract an integer from a JSON object.
- Parameters
-
| [in] | root | json object |
| [in] | node_name | key in a JSON object |
| [out] | value | value in a JSON object |
| [out] | err_msg | error message |
- Returns
- Return true if successful; otherwise, return false
◆ fetch_json_long_node()
| bool ssgx::json_t::fetch_json_long_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
long & | value, |
|
|
std::string & | err_msg ) |
Extract a long integer from a JSON object.
- Parameters
-
| [in] | root | json object |
| [in] | node_name | key in a JSON object |
| [out] | value | value in a JSON object |
| [out] | err_msg | error message |
- Returns
- Return true if successful; otherwise, return false
◆ fetch_json_object_node()
| bool ssgx::json_t::fetch_json_object_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
nlohmann::json & | value, |
|
|
std::string & | err_msg ) |
Extract a json object from a JSON object.
- Parameters
-
| [in] | root | json object |
| [in] | node_name | key in a JSON object |
| [out] | value | value in a JSON object |
| [out] | err_msg | error message |
- Returns
- Return true if successful; otherwise, return false
◆ fetch_json_string_node()
| bool ssgx::json_t::fetch_json_string_node |
( |
const nlohmann::json & | root, |
|
|
const std::string & | node_name, |
|
|
std::string & | value, |
|
|
std::string & | err_msg ) |
Extract a string from a JSON object.
- Parameters
-
| [in] | root | json object |
| [in] | node_name | key in a JSON object |
| [out] | value | value in a JSON object |
| [out] | err_msg | error message |
- Returns
- Return true if successful; otherwise, return false