Orcus
Public Types | Public Attributes | List of all members
orcus::json_config Struct Reference

Public Types

enum  output_format_type { output_format_type::none, output_format_type::xml, output_format_type::json, output_format_type::check }
 

Public Attributes

std::string input_path
 
std::string output_path
 
output_format_type output_format
 
bool preserve_object_order
 
bool resolve_references
 
bool persistent_string_values
 

Member Enumeration Documentation

Enumerator
none 

Output format is not specified.

xml 

Output format is XML.

json 

Output format is JSON.

check 

Special output format used in unit tests to verify content.

Member Data Documentation

std::string orcus::json_config::input_path

Path of the JSON file being parsed, in case the JSON string originates from a file. This parameter is required if external JSON files need to be resolved. Otherwise it's optional.

output_format_type orcus::json_config::output_format

Output format type. Used only from the orcus-json command line tool.

std::string orcus::json_config::output_path

Path of the file to which output is written to. Used only from the orcus-json command line tool.

bool orcus::json_config::persistent_string_values

When true, the document tree should allocate memory and hold copies of string values in the tree. When false, no extra memory is allocated for string values in the tree and the string values simply point to the original json string stream.

In other words, when this option is set to false, the caller must ensure that the json string stream instance stays alive for the entire life cycle of the document tree.

bool orcus::json_config::preserve_object_order

Control whether or not to preserve the order of object's child name/value pairs. By definition, JSON's object is an unordered set of name/value pairs, but in some cases preserving the original order may be desirable.

bool orcus::json_config::resolve_references

Control whether or not to resolve JSON references to external files.