![]() |
TerraForge3D
2.3.1
3D Terrain And Landscape Generator
|
deserialization of CBOR, MessagePack, and UBJSON values More...
#include <json.hpp>
Public Member Functions | |
binary_reader (InputAdapterType &&adapter) noexcept | |
create a binary reader More... | |
binary_reader (const binary_reader &)=delete | |
binary_reader (binary_reader &&)=default | |
binary_reader & | operator= (const binary_reader &)=delete |
binary_reader & | operator= (binary_reader &&)=default |
bool | sax_parse (const input_format_t format, json_sax_t *sax_, const bool strict=true, const cbor_tag_handler_t tag_handler=cbor_tag_handler_t::error) |
Private Types | |
using | number_integer_t = typename BasicJsonType::number_integer_t |
using | number_unsigned_t = typename BasicJsonType::number_unsigned_t |
using | number_float_t = typename BasicJsonType::number_float_t |
using | string_t = typename BasicJsonType::string_t |
using | binary_t = typename BasicJsonType::binary_t |
using | json_sax_t = SAX |
using | char_type = typename InputAdapterType::char_type |
using | char_int_type = typename std::char_traits< char_type >::int_type |
Private Member Functions | |
bool | parse_bson_internal () |
Reads in a BSON-object and passes it to the SAX-parser. More... | |
bool | get_bson_cstr (string_t &result) |
Parses a C-style string from the BSON input. More... | |
template<typename NumberType > | |
bool | get_bson_string (const NumberType len, string_t &result) |
Parses a zero-terminated string of length len from the BSON input. More... | |
template<typename NumberType > | |
bool | get_bson_binary (const NumberType len, binary_t &result) |
Parses a byte array input of length len from the BSON input. More... | |
bool | parse_bson_element_internal (const char_int_type element_type, const std::size_t element_type_parse_position) |
Read a BSON document element of the given element_type. More... | |
bool | parse_bson_element_list (const bool is_array) |
Read a BSON element list (as specified in the BSON-spec) More... | |
bool | parse_bson_array () |
Reads an array from the BSON input and passes it to the SAX-parser. More... | |
bool | parse_cbor_internal (const bool get_char, const cbor_tag_handler_t tag_handler) |
bool | get_cbor_string (string_t &result) |
reads a CBOR string More... | |
bool | get_cbor_binary (binary_t &result) |
reads a CBOR byte array More... | |
bool | get_cbor_array (const std::size_t len, const cbor_tag_handler_t tag_handler) |
bool | get_cbor_object (const std::size_t len, const cbor_tag_handler_t tag_handler) |
bool | parse_msgpack_internal () |
bool | get_msgpack_string (string_t &result) |
reads a MessagePack string More... | |
bool | get_msgpack_binary (binary_t &result) |
reads a MessagePack byte array More... | |
bool | get_msgpack_array (const std::size_t len) |
bool | get_msgpack_object (const std::size_t len) |
bool | parse_ubjson_internal (const bool get_char=true) |
bool | get_ubjson_string (string_t &result, const bool get_char=true) |
reads a UBJSON string More... | |
bool | get_ubjson_size_value (std::size_t &result) |
bool | get_ubjson_size_type (std::pair< std::size_t, char_int_type > &result) |
determine the type and size for a container More... | |
bool | get_ubjson_value (const char_int_type prefix) |
bool | get_ubjson_array () |
bool | get_ubjson_object () |
bool | get_ubjson_high_precision_number () |
char_int_type | get () |
get next character from the input More... | |
char_int_type | get_ignore_noop () |
template<typename NumberType , bool InputIsLittleEndian = false> | |
bool | get_number (const input_format_t format, NumberType &result) |
template<typename NumberType > | |
bool | get_string (const input_format_t format, const NumberType len, string_t &result) |
create a string by reading characters from the input More... | |
template<typename NumberType > | |
bool | get_binary (const input_format_t format, const NumberType len, binary_t &result) |
create a byte array by reading bytes from the input More... | |
bool | unexpect_eof (const input_format_t format, const char *context) const |
std::string | get_token_string () const |
std::string | exception_message (const input_format_t format, const std::string &detail, const std::string &context) const |
Private Attributes | |
InputAdapterType | ia |
input adapter More... | |
char_int_type | current = std::char_traits<char_type>::eof() |
the current character More... | |
std::size_t | chars_read = 0 |
the number of characters read More... | |
const bool | is_little_endian = little_endianess() |
whether we can assume little endianess More... | |
json_sax_t * | sax = nullptr |
the SAX parser More... | |
deserialization of CBOR, MessagePack, and UBJSON values