DAW JSON Link
Functions
daw::json::anonymous_namespace{daw_from_json.h} Namespace Reference

Functions

template<typename JsonMember , bool KnownBounds, json_options_t P, typename Allocator , auto... PolicyFlags>
constexpr auto from_json (basic_json_value< P, Allocator > value, options::parse_flags_t< PolicyFlags... >)
 Parse a value from a json_value. More...
 
template<typename JsonMember , bool KnownBounds, json_options_t P, typename Allocator , auto... PolicyFlags>
constexpr auto from_json (basic_json_value< P, Allocator > value, std::string_view member_path, options::parse_flags_t< PolicyFlags... >)
 Parse a JSONMember from the json_data starting at member_path. More...
 
template<typename JsonMember , bool KnownBounds, json_options_t PolicyFlags, typename Allocator >
constexpr auto from_json (basic_json_value< PolicyFlags > value, std::string_view member_path)
 Parse a JSONMember from the json_data starting at member_path. More...
 
template<typename JsonMember , bool KnownBounds, json_options_t PolicyFlags, typename Allocator >
constexpr auto from_json (basic_json_value< PolicyFlags, Allocator > value)
 Parse a value from a json_value. More...
 
template<typename JsonMember , bool KnownBounds, typename String >
constexpr auto from_json (String &&json_data)
 Construct the JSONMember from the JSON document argument. More...
 
template<typename JsonMember , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr auto from_json (String &&json_data, options::parse_flags_t< PolicyFlags... >)
 Construct the JSONMember from the JSON document argument. More...
 
template<typename JsonMember , bool KnownBounds, typename String >
constexpr auto from_json (String &&json_data, std::string_view member_path)
 Parse a JSONMember from the json_data starting at member_path. More...
 
template<typename JsonMember , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr auto from_json (String &&json_data, std::string_view member_path, options::parse_flags_t< PolicyFlags... >)
 Parse a JSONMember from the json_data starting at member_path. More...
 
template<typename JsonMember , bool KnownBounds, typename String , typename Allocator >
constexpr auto from_json_alloc (String &&json_data, Allocator const &alloc)
 Construct the JSONMember from the JSON document argument. More...
 
template<typename JsonMember , bool KnownBounds, typename String , typename Allocator , auto... PolicyFlags>
constexpr auto from_json_alloc (String &&json_data, Allocator const &alloc, options::parse_flags_t< PolicyFlags... >)
 Construct the JSONMember from the JSON document argument. More...
 
template<typename JsonMember , bool KnownBounds, typename String , typename Allocator >
constexpr auto from_json_alloc (String &&json_data, std::string_view member_path, Allocator const &alloc)
 Parse a JSONMember from the json_data starting at member_path. More...
 
template<typename JsonMember , bool KnownBounds, typename String , typename Allocator , auto... PolicyFlags>
constexpr auto from_json_alloc (String &&json_data, std::string_view member_path, Allocator const &alloc, options::parse_flags_t< PolicyFlags... >)
 Parse a JSON Member from the json_data starting at member_path. More...
 
template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String >
constexpr Container from_json_array (String &&json_data)
 Parse JSON data where the root item is an array. More...
 
template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr Container from_json_array (String &&json_data, options::parse_flags_t< PolicyFlags... >)
 Parse JSON data where the root item is an array. More...
 
template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String >
constexpr Container from_json_array (String &&json_data, std::string_view member_path)
 Parse JSON data where the root item is an array. More...
 
template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr Container from_json_array (String &&json_data, std::string_view member_path, options::parse_flags_t< PolicyFlags... >)
 Parse JSON data where the root item is an array. More...
 

Function Documentation

◆ from_json() [1/8]

template<typename JsonMember , bool KnownBounds, json_options_t P, typename Allocator , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( basic_json_value< P, Allocator >  value,
options::parse_flags_t< PolicyFlags... >   
)
inlineconstexpr

Parse a value from a json_value.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
valueJSON data, see basic_json_value
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 381 of file daw_from_json.h.

◆ from_json() [2/8]

template<typename JsonMember , bool KnownBounds, json_options_t P, typename Allocator , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( basic_json_value< P, Allocator >  value,
std::string_view  member_path,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Parse a JSONMember from the json_data starting at member_path.

Parameters
valueJSON data, see basic_json_value
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
JsonMemberThe type of the item being parsed
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 433 of file daw_from_json.h.

◆ from_json() [3/8]

template<typename JsonMember , bool KnownBounds, json_options_t PolicyFlags, typename Allocator >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( basic_json_value< PolicyFlags >  value,
std::string_view  member_path 
)
constexpr

Parse a JSONMember from the json_data starting at member_path.

Parameters
valueJSON data, see basic_json_value
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
JsonMemberThe type of the item being parsed
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 480 of file daw_from_json.h.

◆ from_json() [4/8]

template<typename JsonMember , bool KnownBounds, json_options_t PolicyFlags, typename Allocator >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( basic_json_value< PolicyFlags, Allocator >  value)
inlineconstexpr

Parse a value from a json_value.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
valueJSON data, see basic_json_value
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 414 of file daw_from_json.h.

◆ from_json() [5/8]

template<typename JsonMember , bool KnownBounds, typename String >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( String &&  json_data)
constexpr

Construct the JSONMember from the JSON document argument.

Template Parameters
JsonMemberany bool, arithmetic, string, string_view, daw::json::json_data_contract
Parameters
json_dataJSON string data
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A reified JSONMember constructed from JSON data
Exceptions
daw::json::json_exception

Definition at line 95 of file daw_from_json.h.

◆ from_json() [6/8]

template<typename JsonMember , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( String &&  json_data,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Construct the JSONMember from the JSON document argument.

Template Parameters
JsonMemberany bool, arithmetic, string, string_view, daw::json::json_data_contract
Parameters
json_dataJSON string data
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A reified T constructed from JSON data
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 39 of file daw_from_json.h.

◆ from_json() [7/8]

template<typename JsonMember , bool KnownBounds, typename String >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( String &&  json_data,
std::string_view  member_path 
)
constexpr

Parse a JSONMember from the json_data starting at member_path.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
json_dataJSON string data
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 264 of file daw_from_json.h.

◆ from_json() [8/8]

template<typename JsonMember , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json ( String &&  json_data,
std::string_view  member_path,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Parse a JSONMember from the json_data starting at member_path.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
json_dataJSON string data
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 191 of file daw_from_json.h.

◆ from_json_alloc() [1/4]

template<typename JsonMember , bool KnownBounds, typename String , typename Allocator >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json_alloc ( String &&  json_data,
Allocator const &  alloc 
)
constexpr

Construct the JSONMember from the JSON document argument.

Template Parameters
JsonMemberany bool, arithmetic, string, string_view, daw::json::json_data_contract
Parameters
json_dataJSON string data
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A reified T constructed from JSON data
Exceptions
daw::json::json_exception

Definition at line 169 of file daw_from_json.h.

◆ from_json_alloc() [2/4]

template<typename JsonMember , bool KnownBounds, typename String , typename Allocator , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json_alloc ( String &&  json_data,
Allocator const &  alloc,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Construct the JSONMember from the JSON document argument.

Template Parameters
JsonMemberany bool, arithmetic, string, string_view, daw::json::json_data_contract
Parameters
json_dataJSON string data
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A reified T constructed from JSON data
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 114 of file daw_from_json.h.

◆ from_json_alloc() [3/4]

template<typename JsonMember , bool KnownBounds, typename String , typename Allocator >
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json_alloc ( String &&  json_data,
std::string_view  member_path,
Allocator const &  alloc 
)
constexpr

Parse a JSONMember from the json_data starting at member_path.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
json_dataJSON string data
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

Definition at line 360 of file daw_from_json.h.

◆ from_json_alloc() [4/4]

template<typename JsonMember , bool KnownBounds, typename String , typename Allocator , auto... PolicyFlags>
constexpr auto daw::json::anonymous_namespace{daw_from_json.h}::from_json_alloc ( String &&  json_data,
std::string_view  member_path,
Allocator const &  alloc,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Parse a JSON Member from the json_data starting at member_path.

Template Parameters
JsonMemberThe type of the item being parsed
Parameters
json_dataJSON string data
member_pathA dot separated path of member names, default is the root. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A value reified from the JSON data member
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 287 of file daw_from_json.h.

◆ from_json_array() [1/4]

template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String >
constexpr Container daw::json::anonymous_namespace{daw_from_json.h}::from_json_array ( String &&  json_data)
constexpr

Parse JSON data where the root item is an array.

Template Parameters
JsonElementThe type of each element in array. Must be one of the above json_XXX classes. This version is checked
ContainerContainer to store values in
ConstructorCallable to construct Container with no arguments
Parameters
json_dataJSON string data containing array
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A Container containing parsed data from JSON string
Exceptions
daw::json::json_exception

Definition at line 567 of file daw_from_json.h.

◆ from_json_array() [2/4]

template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr Container daw::json::anonymous_namespace{daw_from_json.h}::from_json_array ( String &&  json_data,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Parse JSON data where the root item is an array.

Template Parameters
JsonElementThe type of each element in array. Must be one of the above json_XXX classes. This version is checked
ContainerContainer to store values in
ConstructorCallable to construct Container with no arguments
Parameters
json_dataJSON string data containing array
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A Container containing parsed data from JSON string
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 499 of file daw_from_json.h.

◆ from_json_array() [3/4]

template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String >
constexpr Container daw::json::anonymous_namespace{daw_from_json.h}::from_json_array ( String &&  json_data,
std::string_view  member_path 
)
constexpr

Parse JSON data where the root item is an array.

Template Parameters
JsonElementThe type of each element in array. Must be one of the above json_XXX classes. This version is checked
ContainerContainer to store values in
ConstructorCallable to construct Container with no arguments
Parameters
json_dataJSON string data containing array
member_pathA dot separated path of member names to start parsing from. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A Container containing parsed data from JSON string
Exceptions
daw::json::json_exception

Definition at line 679 of file daw_from_json.h.

◆ from_json_array() [4/4]

template<typename JsonElement , typename Container , typename Constructor , bool KnownBounds, typename String , auto... PolicyFlags>
constexpr Container daw::json::anonymous_namespace{daw_from_json.h}::from_json_array ( String &&  json_data,
std::string_view  member_path,
options::parse_flags_t< PolicyFlags... >   
)
constexpr

Parse JSON data where the root item is an array.

Template Parameters
JsonElementThe type of each element in array. Must be one of the above json_XXX classes. This version is checked
ContainerContainer to store values in
ConstructorCallable to construct Container with no arguments
Parameters
json_dataJSON string data containing array
member_pathA dot separated path of member names to start parsing from. Array indices are specified with square brackets e.g. [5] is the 6th item
Template Parameters
KnownBoundsThe bounds of the json_data are known to contain the whole value
Returns
A Container containing parsed data from JSON string
Exceptions
daw::json::json_exception

If the string is known to have a trailing zero, allow optimization on that

Definition at line 591 of file daw_from_json.h.