![]() |
DAW JSON Link
|
Namespaces | |
datetime | |
parse_utils | |
utils | |
Typedefs | |
using | CppCommentSkippingPolicyChecked = BasicParsePolicy< false, CppCommentSkippingPolicy, default_exec_tag, false > |
using | CppCommentSkippingPolicyUnchecked = BasicParsePolicy< true, CppCommentSkippingPolicy, default_exec_tag, false > |
using | default_exec_tag = constexpr_exec_tag |
using | DefaultParsePolicy = NoCommentSkippingPolicyChecked |
using | HashCommentSkippingPolicyChecked = BasicParsePolicy< false, HashCommentSkippingPolicy, default_exec_tag, false > |
using | HashCommentSkippingPolicyUnchecked = BasicParsePolicy< true, HashCommentSkippingPolicy, default_exec_tag, false > |
template<JSONNAMETYPE Name, typename JsonElement , typename Container = std::vector<typename json_details::unnamed_default_type_mapping< JsonElement>::parse_to_t>, typename Constructor = nullable_constructor<Container>> | |
using | json_array_null = json_array< Name, JsonElement, Container, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T = std::optional<bool>, LiteralAsStringOpt LiteralAsString = LiteralAsStringOpt::Never, typename Constructor = nullable_constructor<T>> | |
using | json_bool_null = json_bool< Name, T, LiteralAsString, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T = double, LiteralAsStringOpt LiteralAsString = LiteralAsStringOpt::Never, typename Constructor = default_constructor<T>, JsonNullable Nullable = JsonNullable::Never> | |
using | json_checked_number = json_number< Name, T, LiteralAsString, Constructor, JsonRangeCheck::CheckForNarrowing, Nullable > |
template<JSONNAMETYPE Name, typename T = std::optional<double>, LiteralAsStringOpt LiteralAsString = LiteralAsStringOpt::Never, typename Constructor = nullable_constructor<T>> | |
using | json_checked_number_null = json_number< Name, T, LiteralAsString, Constructor, JsonRangeCheck::CheckForNarrowing, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T , typename Constructor = nullable_constructor<T>> | |
using | json_class_null = json_class< Name, T, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T , typename FromConverter = custom_from_converter_t<T>, typename ToConverter = custom_to_converter_t<T>, CustomJsonTypes CustomJsonType = CustomJsonTypes::Either> | |
using | json_custom_null = json_custom< Name, T, FromConverter, ToConverter, CustomJsonType, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T = std::optional<std::chrono::time_point< std::chrono::system_clock, std::chrono::milliseconds>>, typename Constructor = construct_from_iso8601_timestamp<JsonNullable::Nullable>> | |
using | json_date_null = json_date< Name, T, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename Container , typename JsonValueType , typename JsonKeyType , typename Constructor = nullable_constructor<Container>> | |
using | json_key_value_array_null = json_key_value_array< Name, Container, JsonValueType, JsonKeyType, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename Container , typename JsonValueType , typename JsonKeyType = json_string<no_name>, typename Constructor = nullable_constructor<Container>> | |
using | json_key_value_null = json_key_value< Name, Container, JsonValueType, JsonKeyType, Constructor, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename T > | |
using | json_link_quick_map_t = typename decltype(json_link_quick_map< Name, T >())::mapped_type |
template<JSONNAMETYPE Name, typename T = std::optional<double>, LiteralAsStringOpt LiteralAsString = LiteralAsStringOpt::Never, typename Constructor = nullable_constructor<T>, JsonRangeCheck RangeCheck = JsonRangeCheck::Never> | |
using | json_number_null = json_number< Name, T, LiteralAsString, Constructor, RangeCheck, JsonNullable::Nullable > |
using | json_pair = basic_json_pair< NoCommentSkippingPolicyChecked > |
template<JSONNAMETYPE Name, typename String = std::optional<std::string>, typename Constructor = nullable_constructor<String>, JsonNullable EmptyStringNull = JsonNullable::Never, EightBitModes EightBitMode = EightBitModes::AllowFull> | |
using | json_string_null = json_string< Name, String, Constructor, EmptyStringNull, EightBitMode, JsonNullable::Nullable > |
template<JSONNAMETYPE Name, typename String = std::optional<std::string>, typename Constructor = nullable_constructor<String>, JsonNullable EmptyStringNull = JsonNullable::Nullable, EightBitModes EightBitMode = EightBitModes::AllowFull, AllowEscapeCharacter AllowEscape = AllowEscapeCharacter::Allow> | |
using | json_string_raw_null = json_string_raw< Name, String, Constructor, EmptyStringNull, EightBitMode, JsonNullable::Nullable, AllowEscape > |
template<JSONNAMETYPE Name, typename T , typename TagMember , typename Switcher , typename JsonElements = json_details::determine_variant_element_types<JsonNullable::Nullable, T>, typename Constructor = nullable_constructor<T>> | |
using | json_tagged_variant_null = json_tagged_variant< Name, T, TagMember, Switcher, JsonElements, Constructor, JsonNullable::Nullable > |
using | json_value = basic_json_value< NoCommentSkippingPolicyChecked > |
using | json_value_state = basic_stateful_json_value< NoCommentSkippingPolicyChecked > |
template<JSONNAMETYPE Name, typename T , typename JsonElements , typename Constructor = nullable_constructor<T>> | |
using | json_variant_null = json_variant< Name, T, JsonElements, Constructor, JsonNullable::Nullable > |
using | NoCommentSkippingPolicy = BasicNoCommentSkippingPolicy< false > |
using | NoCommentSkippingPolicyChecked = BasicParsePolicy< false, NoCommentSkippingPolicy, default_exec_tag, false > |
using | NoCommentSkippingPolicyUnchecked = BasicParsePolicy< true, NoCommentSkippingPolicy, default_exec_tag, false > |
template<JsonParseTypes v> | |
using | ParseTag = std::integral_constant< JsonParseTypes, v > |
using | simd_exec_tag = runtime_exec_tag |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDCppCommentSkippingPolicyChecked = BasicParsePolicy< false, CppCommentSkippingPolicy, ExecTag, false, Allocator > |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDCppCommentSkippingPolicyUnchecked = BasicParsePolicy< true, CppCommentSkippingPolicy, ExecTag, false, Allocator > |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDHashCommentSkippingPolicyChecked = BasicParsePolicy< false, HashCommentSkippingPolicy, ExecTag, false, Allocator > |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDHashCommentSkippingPolicyUnchecked = BasicParsePolicy< true, HashCommentSkippingPolicy, ExecTag, false, Allocator > |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDNoCommentSkippingPolicyChecked = BasicParsePolicy< false, NoCommentSkippingPolicy, ExecTag, false, Allocator > |
template<typename ExecTag , typename Allocator = json_details::NoAllocator> | |
using | SIMDNoCommentSkippingPolicyUnchecked = BasicParsePolicy< true, NoCommentSkippingPolicy, ExecTag, false, Allocator > |
Functions | |
template<typename Range > | |
basic_json_value_iterator_range (basic_json_value_iterator< Range >, basic_json_value_iterator< Range >) -> basic_json_value_iterator_range< Range > | |
constexpr std::size_t | find_column_number_of (char const *doc_pos, char const *doc_start) |
constexpr std::size_t | find_column_number_of (json_path_node const &node, char const *doc_start) |
std::vector< json_path_node > | find_json_path_stack_to (char const *parse_location, char const *doc_start) |
Get the json_path_nodes representing the path to the nearest value's position in the document. More... | |
std::vector< json_path_node > | find_json_path_stack_to (json_exception const &jex, char const *doc_start) |
std::string | find_json_path_to (char const *parse_location, char const *doc_start) |
std::string | find_json_path_to (json_exception const &jex, char const *doc_start) |
constexpr std::size_t | find_line_number_of (char const *doc_pos, char const *doc_start) |
constexpr std::size_t | find_line_number_of (json_path_node const &node, char const *doc_start) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false, typename Range > | |
constexpr auto | from_json (basic_json_value< Range > value) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false, typename Range > | |
constexpr auto | from_json (basic_json_value< Range > value, std::string_view member_path) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false> | |
constexpr auto | from_json (std::string_view json_data) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false> | |
constexpr auto | from_json (std::string_view json_data, std::string_view member_path) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false, typename Allocator > | |
constexpr auto | from_json_alloc (std::string_view json_data, Allocator &alloc) |
template<typename JsonMember , typename ParsePolicy = NoCommentSkippingPolicyChecked, bool KnownBounds = false, typename Allocator > | |
constexpr auto | from_json_alloc (std::string_view json_data, std::string_view member_path, Allocator &alloc) |
template<typename JsonElement , typename Container = std::vector<typename json_details::unnamed_default_type_mapping< JsonElement>::parse_to_t>, typename ParsePolicy = NoCommentSkippingPolicyChecked, typename Constructor = daw::construct_a_t<Container>, bool KnownBounds = false> | |
constexpr Container | from_json_array (std::string_view json_data, std::string_view member_path="") |
template<std::size_t Idx, typename Range > | |
constexpr decltype(auto) | get (basic_json_pair< Range > &&rng) |
template<std::size_t Idx, typename Range > | |
constexpr decltype(auto) | get (basic_json_pair< Range > &rng) |
template<std::size_t Idx, typename Range > | |
constexpr decltype(auto) | get (basic_json_pair< Range > const &rng) |
template<typename ParsePolicy = NoCommentSkippingPolicyChecked, typename StackContainerPolicy = DefaultJsonEventParserStackPolicy< JsonEventParserStackValue<ParsePolicy>>, typename Handler > | |
constexpr void | json_event_parser (daw::json::basic_json_value< ParsePolicy > jvalue, Handler &&handler) |
template<typename ParsePolicy = NoCommentSkippingPolicyChecked, typename Handler > | |
void | json_event_parser (std::string_view json_document, Handler &&handler) |
template<JSONNAMETYPE Name, typename T > | |
constexpr DAW_ATTRIBUTE_HIDDEN auto | json_link_quick_map () |
template<typename Real , typename OutputIterator > | |
OutputIterator | real2string (Real const &value, OutputIterator out_it) |
template<typename Result = std::string, typename Value , typename JsonClass = typename json_details::unnamed_default_type_mapping<Value>> | |
constexpr Result | to_json (Value const &value) |
template<typename Value , typename JsonClass = typename json_details::unnamed_default_type_mapping<Value>, typename OutputIterator > | |
constexpr OutputIterator | to_json (Value const &value, OutputIterator out_it) |
template<typename Result = std::string, typename JsonElement = json_details::auto_detect_array_element, typename Container > | |
constexpr Result | to_json_array (Container &&c) |
template<typename JsonElement = json_details::auto_detect_array_element, typename Container , typename OutputIterator > | |
constexpr OutputIterator | to_json_array (Container const &c, OutputIterator out_it) |
std::string | to_json_path_string (std::vector< json_path_node > const &path_stack) |
Convert a json_path_node stack to a JSON Path string. More... | |
constexpr std::string_view | to_string (JsonBaseParseTypes pt) |
Variables | |
template<JsonParseTypes ParseType, JsonNullable Nullable> | |
constexpr JsonParseTypes | get_parse_type_v |
template<typename T > | |
constexpr bool | has_json_link_quick_map_v |
template<typename JsonMember > | |
constexpr bool | is_no_name = JsonMember::name == no_name |
constexpr char const | no_name [] = "\a" |
using daw::json::CppCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, CppCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::CppCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, CppCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::default_exec_tag = typedef constexpr_exec_tag |
using daw::json::DefaultParsePolicy = typedef NoCommentSkippingPolicyChecked |
using daw::json::HashCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, HashCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::HashCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, HashCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::json_array_null = typedef json_array<Name, JsonElement, Container, Constructor, JsonNullable::Nullable> |
Link to a nullable JSON array
Name | name of JSON member to link to |
Container | type of C++ container being constructed(e.g. vector<int>) |
JsonElement | Json type being parsed e.g. json_number, json_string... |
Constructor | A callable used to make Container, default will use the Containers constructor. Both normal and aggregate are supported |
using daw::json::json_bool_null = typedef json_bool<Name, T, LiteralAsString, Constructor, JsonNullable::Nullable> |
The member is a nullable boolean
Name | name of json member |
T | result type to pass to Constructor |
LiteralAsString | Could this number be embedded in a string |
Constructor | Callable used to construct result |
using daw::json::json_checked_number = typedef json_number<Name, T, LiteralAsString, Constructor, JsonRangeCheck::CheckForNarrowing, Nullable> |
The member is a range checked number
Name | name of json member |
T | type of number(e.g. double, int, unsigned...) to pass to Constructor |
LiteralAsString | Could this number be embedded in a string |
Constructor | Callable used to construct result |
Nullable | Can the member be missing or have a null value |
using daw::json::json_checked_number_null = typedef json_number<Name, T, LiteralAsString, Constructor, JsonRangeCheck::CheckForNarrowing, JsonNullable::Nullable> |
The member is a nullable range checked number
Name | name of json member |
T | type of number(e.g. optional<double>, optional<int>, optional<unsigned>...) to pass to Constructor |
LiteralAsString | Could this number be embedded in a string |
Constructor | Callable used to construct result |
using daw::json::json_class_null = typedef json_class<Name, T, Constructor, JsonNullable::Nullable> |
Link to a nullable JSON class
Name | name of JSON member to link to |
T | type that has specialization of daw::json::json_data_contract |
Constructor | A callable used to construct T. The default supports normal and aggregate construction |
using daw::json::json_custom_null = typedef json_custom<Name, T, FromConverter, ToConverter, CustomJsonType, JsonNullable::Nullable> |
Allow parsing of a nullable type that does not fit
Name | Name of JSON member to link to |
T | type of value being constructed |
FromConverter | Callable that accepts a std::string_view of the range to parse |
ToConverter | Returns a string from the value |
CustomJsonType | JSON type value is encoded as literal/string |
using daw::json::json_date_null = typedef json_date<Name, T, Constructor, JsonNullable::Nullable> |
Link to a JSON string representing a nullable date
Name | name of JSON member to link to |
T | C++ type to construct, by default is a time_point |
Constructor | A Callable used to construct a T. Must accept a char pointer and size as argument to the date/time string. |
using daw::json::json_key_value_array_null = typedef json_key_value_array<Name, Container, JsonValueType, JsonKeyType, Constructor, JsonNullable::Nullable> |
Map a nullable KV type json array [ {"key": ValueOfKeyType, "value": ValueOfValueType},... ] to a c++ class. needs to be constructable with a pointer, size
Name | name of JSON member to link to |
Container | type to put values in |
JsonValueType | Json type of value in kv pair( e.g. json_number, json_string, ... ). If specific json member type isn't specified, the member name defaults to "value" |
JsonKeyType | type of key in kv pair. If specific json member type isn't specified, the key name defaults to "key" |
Constructor | A callable used to make Container, default will use the Containers constructor. Both normal and aggregate are supported |
using daw::json::json_key_value_null = typedef json_key_value<Name, Container, JsonValueType, JsonKeyType, Constructor, JsonNullable::Nullable> |
Map a nullable KV type json class { "Key StringRaw": ValueType, ... } to a c++ class. Keys are Always string like and the destination needs to be constructable with a pointer, size
Name | name of JSON member to link to |
Container | type to put values in |
JsonValueType | Json type of value in kv pair( e.g. json_number, json_string, ... ). It also supports basic types like numbers, bool, and mapped classes and enums(mapped to numbers) |
JsonKeyType | type of key in kv pair. As with value it supports basic types too |
Constructor | A callable used to make Container, default will use the Containers constructor. Both normal and aggregate are supported |
using daw::json::json_link_quick_map_t = typedef typename decltype( json_link_quick_map<Name, T>( ) )::mapped_type |
using daw::json::json_number_null = typedef json_number<Name, T, LiteralAsString, Constructor, RangeCheck, JsonNullable::Nullable> |
The member is a nullable number
Name | name of json member |
T | type of number(e.g. double, int, unsigned...) to pass to Constructor |
LiteralAsString | Could this number be embedded in a string |
Constructor | Callable used to construct result |
RangeCheck | Check if thevalue will fit in the result |
using daw::json::json_pair = typedef basic_json_pair<NoCommentSkippingPolicyChecked> |
using daw::json::json_string_null = typedef json_string<Name, String, Constructor, EmptyStringNull, EightBitMode, JsonNullable::Nullable> |
Member is a nullable escaped string and requires unescaping and escaping of string data
Name | of json member |
String | result type constructed by Constructor |
Constructor | a callable taking as arguments ( InputIterator, InputIterator ). If others are needed use the Constructor callable convert |
EmptyStringNull | if string is empty, call Constructor with no arguments |
EightBitMode | Allow filtering of characters with the MSB set |
using daw::json::json_string_raw_null = typedef json_string_raw<Name, String, Constructor, EmptyStringNull, EightBitMode, JsonNullable::Nullable, AllowEscape> |
Member is a nullable escaped string and requires unescaping and escaping of string data. Not all invalid codepoints are detected
Name | of json member |
String | result type constructed by Constructor |
Constructor | a callable taking as arguments ( char const *, std::size_t ) |
EmptyStringNull | if string is empty, call Constructor with no arguments |
EightBitMode | Allow filtering of characters with the MSB set arguments |
AllowEscape | Tell parser if we know a \ or escape will be in the data |
using daw::json::json_tagged_variant_null = typedef json_tagged_variant<Name, T, TagMember, Switcher, JsonElements, Constructor, JsonNullable::Nullable> |
using daw::json::json_value = typedef basic_json_value<NoCommentSkippingPolicyChecked> |
using daw::json::json_value_state = typedef basic_stateful_json_value<NoCommentSkippingPolicyChecked> |
using daw::json::json_variant_null = typedef json_variant<Name, T, JsonElements, Constructor, JsonNullable::Nullable> |
using daw::json::NoCommentSkippingPolicy = typedef BasicNoCommentSkippingPolicy<false> |
using daw::json::NoCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, NoCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::NoCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, NoCommentSkippingPolicy, default_exec_tag, false> |
using daw::json::ParseTag = typedef std::integral_constant<JsonParseTypes, v> |
Tag lookup for parsing overload selection
using daw::json::simd_exec_tag = typedef runtime_exec_tag |
using daw::json::SIMDCppCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, CppCommentSkippingPolicy, ExecTag, false, Allocator> |
using daw::json::SIMDCppCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, CppCommentSkippingPolicy, ExecTag, false, Allocator> |
using daw::json::SIMDHashCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, HashCommentSkippingPolicy, ExecTag, false, Allocator> |
using daw::json::SIMDHashCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, HashCommentSkippingPolicy, ExecTag, false, Allocator> |
using daw::json::SIMDNoCommentSkippingPolicyChecked = typedef BasicParsePolicy<false, NoCommentSkippingPolicy, ExecTag, false, Allocator> |
using daw::json::SIMDNoCommentSkippingPolicyUnchecked = typedef BasicParsePolicy<true, NoCommentSkippingPolicy, ExecTag, false, Allocator> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
daw::json::basic_json_value_iterator_range | ( | basic_json_value_iterator< Range > | , |
basic_json_value_iterator< Range > | |||
) | -> basic_json_value_iterator_range< Range > |
|
constexpr |
|
constexpr |
|
inline |
Get the json_path_nodes representing the path to the nearest value's position in the document.
parse_location | The position in the document to find |
doc_start | A pointer to the stat of the JSON document |
|
inline |
|
inline |
|
inline |
|
constexpr |
|
constexpr |
|
inlineconstexpr |
|
constexpr |
|
constexpr |
Construct the JSONMember from the JSON document argument.
JsonMember | any bool, arithmetic, string, string_view, daw::json::json_data_contract |
json_data | JSON string data |
KnownBounds | The bounds of the json_data are known to contain the whole value |
|
constexpr |
|
constexpr |
Construct the JSONMember from the JSON document argument.
JsonMember | any bool, arithmetic, string, string_view, daw::json::json_data_contract |
json_data | JSON string data |
KnownBounds | The bounds of the json_data are known to contain the whole value |
|
constexpr |
|
constexpr |
Parse JSON data where the root item is an array
JsonElement | The type of each element in array. Must be one of the above json_XXX classes. This version is checked |
Container | Container to store values in |
Constructor | Callable to construct Container with no arguments |
json_data | JSON string data containing array |
member_path | A dot separated path of member names to start parsing from. Array indices are specified with square brackets e.g. [5] is the 6th item |
KnownBounds | The bounds of the json_data are known to contain the whole value |
|
constexpr |
|
constexpr |
|
constexpr |
|
inlineconstexpr |
|
inline |
|
inlineconstexpr |
|
inline |
|
constexpr |
Serialize a value to JSON. Some types(std::string, string_view. integer's and floating point numbers do not need a mapping setup). For user classes, a json_data_contract specialization is needed.
Result | std::string like type to put result into |
JsonClass | Type that has json_parser_description and to_json_data function overloads |
value | value to serialize |
|
constexpr |
OutputIterator | Iterator to character data to |
JsonClass | Type that has json_parser_description and to_json_data function overloads |
value | value to serialize |
out_it | result to serialize to |
|
constexpr |
Serialize a container to JSON. This convenience method allows for easier serialization of containers when the root of the document is an array Serialize Container
Container | Type of Container to serialize the elements of |
c | Container containing data to serialize. |
|
constexpr |
Serialize a container to JSON. This convenience method allows for easier serialization of containers when the root of the document is an array Serialize Container
Container | Type of Container to serialize the elements of |
OutputIterator | Iterator to write data to |
c | Container containing data to serialize. |
|
inline |
Convert a json_path_node stack to a JSON Path string.
path_stack | A vector with json_path_nodes representing the path in the JSON document tree |
|
constexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |