![]() |
Scarab
v3.4.3
Project 8 C++ Utility Library
|
Convert Param to JSON. More...
#include <param_json.hh>
Public Types | |
enum | json_writing_style { k_compact = 0, k_pretty = 1 } |
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 Member Functions | |
param_output_json () | |
virtual | ~param_output_json () |
virtual bool | write_file (const param &a_to_write, const std::string &a_filename, const param_node &a_options=param_node()) |
virtual bool | write_string (const param &a_to_write, std::string &a_string, const param_node &a_options=param_node()) |
template<class XWriter > | |
bool | write_param (const param &a_to_write, XWriter *a_writer) |
template<class XWriter > | |
bool | write_param_null (const param &a_to_write, XWriter *a_writer) |
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) |
![]() | |
param_output_codec () | |
virtual | ~param_output_codec () |
Convert Param to JSON.
Options:
Definition at line 71 of file param_json.hh.
typedef rapidjson::Writer< rapidjson::FileWriteStream > rj_file_writer |
Definition at line 74 of file param_json.hh.
typedef rapidjson::PrettyWriter< rapidjson::FileWriteStream > rj_pretty_file_writer |
Definition at line 75 of file param_json.hh.
typedef rapidjson::PrettyWriter< rapidjson::StringBuffer > rj_pretty_string_writer |
Definition at line 77 of file param_json.hh.
typedef rapidjson::Writer< rapidjson::StringBuffer > rj_string_writer |
Definition at line 76 of file param_json.hh.
enum json_writing_style |
Enumerator | |
---|---|
k_compact | |
k_pretty |
Definition at line 79 of file param_json.hh.
Definition at line 176 of file param_json.cc.
|
virtual |
Definition at line 179 of file param_json.cc.
|
virtual |
Implements param_output_codec.
Definition at line 182 of file param_json.cc.
bool write_param | ( | const param & | a_to_write, |
XWriter * | a_writer | ||
) |
Definition at line 106 of file param_json.hh.
bool write_param_array | ( | const param_array & | a_to_write, |
XWriter * | a_writer | ||
) |
Definition at line 166 of file param_json.hh.
bool write_param_node | ( | const param_node & | a_to_write, |
XWriter * | a_writer | ||
) |
Definition at line 182 of file param_json.hh.
bool write_param_null | ( | const param & | a_to_write, |
XWriter * | a_writer | ||
) |
Definition at line 128 of file param_json.hh.
bool write_param_value | ( | const param_value & | a_to_write, |
XWriter * | a_writer | ||
) |
Definition at line 135 of file param_json.hh.
|
virtual |
Implements param_output_codec.
Definition at line 235 of file param_json.cc.