Safeheron-SGX-Native-Development-Framework v1.2.0
Loading...
Searching...
No Matches
ssgx_json_t.h
Go to the documentation of this file.
1#ifndef SAFEHERON_SGX_TRUSTED_JSON_H
2#define SAFEHERON_SGX_TRUSTED_JSON_H
3
4#include <string>
5
6#include "nlohmann/json_fwd.hpp"
7
8namespace ssgx {
13namespace json_t {
14
23bool fetch_json_string_node(const nlohmann::json& root, const std::string& node_name, std::string& value,
24 std::string& err_msg);
25
34bool fetch_json_int_node(const nlohmann::json& root, const std::string& node_name, int& value, std::string& err_msg);
35
44bool fetch_json_bool_node(const nlohmann::json& root, const std::string& node_name, bool& value, std::string& err_msg);
45
54bool fetch_json_long_node(const nlohmann::json& root, const std::string& node_name, long& value, std::string& err_msg);
55
64bool fetch_json_array_node(const nlohmann::json& root, const std::string& node_name, nlohmann::json& value,
65 std::string& err_msg);
66
75bool fetch_json_object_node(const nlohmann::json& root, const std::string& node_name, nlohmann::json& value,
76 std::string& err_msg);
77
78} // namespace json_t
79} // namespace ssgx
80
81#endif // SAFEHERON_SGX_TRUSTED_JSON_H
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_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.
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_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_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_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.
Definition ssgx_attestation_t.h:6