library/param/codec/json/param_json.hh¶
-
namespace
scarab
¶ The standard scarab namespace.
Functions
-
scarab::LOGGER(dlog_param_json, "param_json")
-
class
param_input_json
¶ - #include <param_json.hh>
Convert JSON to Param.
Options: None
- Author
- N.S. Oblath
Inherits from param_input_codec
Public Functions
-
param_input_json
()¶
-
~param_input_json
()¶
-
param *
read_file
(const std::string &a_filename, const param_node *a_options = nullptr)¶
-
param *
read_string
(const std::string &a_json_str, const param_node *a_options = nullptr)¶
-
param_node *
read_document
(const rapidjson::Document &a_document)¶
-
class
param_output_json
¶ - #include <param_json.hh>
Convert Param to JSON.
Options:
- JSON Style Pretty print: { “style”: param_output_json::k_pretty } or { “style”: “pretty” } Compact (default): { “style”: param_output_json::k_compact } or { “style”: “compact” } or anything else
- Author
- N.S. Oblath
Inherits from param_output_codec
Public Types
-
typedef rapidjson::Writer<rapidjson::FileWriteStream>
rj_file_writer
¶
-
typedef rapidjson::PrettyWriter<rapidjson::FileWriteStream>
rj_pretty_file_writer
¶
-
typedef rapidjson::Writer<rapidjson::StringBuffer>
rj_string_writer
¶
-
typedef rapidjson::PrettyWriter<rapidjson::StringBuffer>
rj_pretty_string_writer
¶
Public Functions
-
param_output_json
()¶
-
~param_output_json
()¶
-
bool
write_file
(const param &a_to_write, const std::string &a_filename, const param_node *a_options = nullptr)¶
-
bool
write_string
(const param &a_to_write, std::string &a_string, const param_node *a_options = nullptr)¶
- template <class XWriter>
-
bool
write_param_value
(const param_value &a_to_write, XWriter *a_writer)¶
- template <class XWriter>
-
bool
write_param_array
(const param_array &a_to_write, XWriter *a_writer)¶
- template <class XWriter>
-
bool
write_param_node
(const param_node &a_to_write, XWriter *a_writer)¶
-