Configurations

struct config

Public Types

using data_type = std::variant<csv_config>

Public Functions

config(format_t input_format)

Public Members

format_t input_format
bool debug

Enable or disable runtime debug output to stdout or stderr.

bool structure_check

Control whether or not to perform strict check of the xml structure of a stream being parsed. When enabled, it throws an xml_structure_error exception when an incorrect xml structure is detected.

data_type data
struct csv_config

configuration settings specific to the CSV format. This struct must be POD.

Public Members

size_t header_row_size

Number of header rows to repeat in case of split.

bool split_to_multiple_sheets

Whether or not to split oversized source data into multiple sheets in case it spills over.

struct json_config

Public Functions

json_config()
~json_config()

Public Members

std::string 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.

std::string output_path

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

dump_format_t output_format

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

bool 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 resolve_references

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

bool 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.

struct yaml_config

Public Types

enum class output_format_type

Values:

enumerator none
enumerator yaml
enumerator json

Public Functions

yaml_config()
~yaml_config()

Public Members

std::string input_path
std::string output_path
output_format_type output_format