|
| enum class | delimiter : uint32_t { COMMA = CTOON_DELIMITER_COMMA
, TAB = CTOON_DELIMITER_TAB
, PIPE = CTOON_DELIMITER_PIPE
} |
| |
| enum class | write_flag : uint32_t {
NOFLAG = static_cast<uint32_t>(CTOON_WRITE_NOFLAG)
, ESCAPE_UNICODE = static_cast<uint32_t>(CTOON_WRITE_ESCAPE_UNICODE)
, ESCAPE_SLASHES = static_cast<uint32_t>(CTOON_WRITE_ESCAPE_SLASHES)
, ALLOW_INF_AND_NAN = static_cast<uint32_t>(CTOON_WRITE_ALLOW_INF_AND_NAN)
,
INF_AND_NAN_AS_NULL = static_cast<uint32_t>(CTOON_WRITE_INF_AND_NAN_AS_NULL)
, ALLOW_INVALID_UNICODE = static_cast<uint32_t>(CTOON_WRITE_ALLOW_INVALID_UNICODE)
, LENGTH_MARKER = static_cast<uint32_t>(CTOON_WRITE_LENGTH_MARKER)
, NEWLINE_AT_END = static_cast<uint32_t>(CTOON_WRITE_NEWLINE_AT_END)
} |
| |
| enum class | read_flag : uint32_t {
NOFLAG = static_cast<uint32_t>(CTOON_READ_NOFLAG)
, INSITU = static_cast<uint32_t>(CTOON_READ_INSITU)
, STOP_WHEN_DONE = static_cast<uint32_t>(CTOON_READ_STOP_WHEN_DONE)
, ALLOW_TRAILING_COMMAS = static_cast<uint32_t>(CTOON_READ_ALLOW_TRAILING_COMMAS)
,
ALLOW_COMMENTS = static_cast<uint32_t>(CTOON_READ_ALLOW_COMMENTS)
, ALLOW_INF_AND_NAN = static_cast<uint32_t>(CTOON_READ_ALLOW_INF_AND_NAN)
, NUMBER_AS_RAW = static_cast<uint32_t>(CTOON_READ_NUMBER_AS_RAW)
, ALLOW_INVALID_UNICODE = static_cast<uint32_t>(CTOON_READ_ALLOW_INVALID_UNICODE)
,
BIGNUM_AS_RAW = static_cast<uint32_t>(CTOON_READ_BIGNUM_AS_RAW)
, ALLOW_BOM = static_cast<uint32_t>(CTOON_READ_ALLOW_BOM)
, ALLOW_EXT_NUMBER = static_cast<uint32_t>(CTOON_READ_ALLOW_EXT_NUMBER)
, ALLOW_EXT_ESCAPE = static_cast<uint32_t>(CTOON_READ_ALLOW_EXT_ESCAPE)
,
ALLOW_EXT_WHITESPACE = static_cast<uint32_t>(CTOON_READ_ALLOW_EXT_WHITESPACE)
, ALLOW_SINGLE_QUOTED_STR = static_cast<uint32_t>(CTOON_READ_ALLOW_SINGLE_QUOTED_STR)
, ALLOW_UNQUOTED_KEY = static_cast<uint32_t>(CTOON_READ_ALLOW_UNQUOTED_KEY)
, NON_STRICT = static_cast<uint32_t>(CTOON_READ_NON_STRICT)
} |
| |
|
| write_flag | operator| (write_flag l, write_flag r) CTOON_NOEXCEPT |
| |
| write_flag & | operator|= (write_flag &l, write_flag r) CTOON_NOEXCEPT |
| |
| ctoon_write_flag | to_c (write_flag f) CTOON_NOEXCEPT |
| | Convert to the C type for passing to C API.
|
| |
| read_flag | operator| (read_flag l, read_flag r) CTOON_NOEXCEPT |
| |
| read_flag & | operator|= (read_flag &l, read_flag r) CTOON_NOEXCEPT |
| |
| ctoon_read_flag | to_c (read_flag f) CTOON_NOEXCEPT |
| | Convert to the C type for passing to C API.
|
| |
| document | parse (const char *toon, read_flag flags=read_flag::NOFLAG) |
| |
| document | parse (const std::string &toon, read_flag flags=read_flag::NOFLAG) |
| |
| document | parse_file (const char *path, read_flag flags=read_flag::NOFLAG) |
| |
| mut_document | make_document () |
| |
| write_result | to_string (const document &d, const write_options &o=write_options()) |
| |
| write_result | to_string (const mut_document &d, const write_options &o=write_options()) |
| |
| document | from_json (const char *json, std::size_t len, read_flag flags=read_flag::NOFLAG) |
| |
| document | from_json (const char *json, read_flag flags=read_flag::NOFLAG) |
| |
| document | from_json (const std::string &json, read_flag flags=read_flag::NOFLAG) |
| |
| document | from_json_file (const char *path, read_flag flags=read_flag::NOFLAG) |
| |
| write_result | to_json (const document &d, int indent=2, write_flag flags=write_flag::NOFLAG) |
| |
| write_result | to_json (const mut_document &d, int indent=2, write_flag flags=write_flag::NOFLAG) |
| |
| write_result | json_to_toon (const char *json, std::size_t len, const write_options &opts=write_options(), read_flag flags=read_flag::NOFLAG) |
| | JSON text -> TOON text.
|
| |
| write_result | json_to_toon (const char *json, const write_options &opts=write_options(), read_flag flags=read_flag::NOFLAG) |
| |
| write_result | json_to_toon (const std::string &json, const write_options &opts=write_options(), read_flag flags=read_flag::NOFLAG) |
| |
| write_result | json_to_toon (const string_view &json, const write_options &opts=write_options(), read_flag flags=read_flag::NOFLAG) |
| |
| void | json_to_toon_file (const char *json_path, const char *toon_path, const write_options &opts=write_options(), read_flag flags=read_flag::NOFLAG) |
| | JSON file -> TOON file.
|
| |
| write_result | toon_to_json (const char *toon, std::size_t len, int indent=0, write_flag wflags=write_flag::NOFLAG, read_flag rflags=read_flag::NOFLAG) |
| | TOON text -> JSON text (compact by default; pass indent > 0 to pretty-print).
|
| |
| write_result | toon_to_json (const char *toon, int indent=0, write_flag wflags=write_flag::NOFLAG, read_flag rflags=read_flag::NOFLAG) |
| |
| write_result | toon_to_json (const std::string &toon, int indent=0, write_flag wflags=write_flag::NOFLAG, read_flag rflags=read_flag::NOFLAG) |
| |
| write_result | toon_to_json (const string_view &toon, int indent=0, write_flag wflags=write_flag::NOFLAG, read_flag rflags=read_flag::NOFLAG) |
| |
| void | toon_to_json_file (const char *toon_path, const char *json_path, int indent=0, write_flag wflags=write_flag::NOFLAG, read_flag rflags=read_flag::NOFLAG) |
| | TOON file -> JSON file.
|
| |