|
JSON Voorhees
Killer JSON for C++
|
Inheritance diagram for jsonv::extraction_context:
Collaboration diagram for jsonv::extraction_context:Public Member Functions | |
| extraction_context () | |
Create a new instance using the default formats (formats::global). | |
| extraction_context (jsonv::formats fmt, const jsonv::version &ver=jsonv::version(), jsonv::path p=jsonv::path(), const void *userdata=nullptr) | |
| Create a new instance using the given fmt, ver and p. | |
| const jsonv::path & | path () const |
Get the current path this extraction_context is extracting for. | |
| template<typename T > | |
| T | extract (const value &from) const |
Attempt to extract a T from from using the formats associated with this context. | |
| void | extract (const std::type_info &type, const value &from, void *into) const |
| template<typename T > | |
| T | extract_sub (const value &from, jsonv::path subpath) const |
Attempt to extract a T from from.at_path(subpath) using the formats associated with this context. | |
| void | extract_sub (const std::type_info &type, const value &from, jsonv::path subpath, void *into) const |
| template<typename T > | |
| T | extract_sub (const value &from, path_element elem) const |
Attempt to extract a T from from.at_path({elem}) using the formats associated with this context. | |
Public Member Functions inherited from jsonv::context_base | |
| context_base () | |
Create a new instance using the default formats (formats::global). | |
| context_base (jsonv::formats fmt, const jsonv::version &ver=jsonv::version(1), const void *userdata=nullptr) | |
| Create a new instance using the given fmt, ver and p. | |
| const jsonv::formats & | formats () const |
Get the formats object backing extraction and encoding. | |
| const jsonv::version | version () const |
Get the version this extraction_context was created with. | |
| const void * | user_data () const |
| Get a pointer to arbitrary user data. | |
Definition at line 601 of file serialization.hpp.
Attempt to extract a T from from using the formats associated with this context.
| T | is the type to extract from from. It must be movable. |
| extraction_error | if anything goes wrong when attempting to extract a value. |
Definition at line 631 of file serialization.hpp.
Here is the call graph for this function:
|
inline |
Attempt to extract a T from from.at_path(subpath) using the formats associated with this context.
| T | is the type to extract from from. It must be movable. |
| extraction_error | if anything goes wrong when attempting to extract a value. |
Definition at line 652 of file serialization.hpp.
|
inline |
Attempt to extract a T from from.at_path({elem}) using the formats associated with this context.
| T | is the type to extract from from. It must be movable. |
| extraction_error | if anything goes wrong when attempting to extract a value. |
Definition at line 670 of file serialization.hpp.
|
inline |
Get the current path this extraction_context is extracting for.
This is useful when debugging and generating error messages.
Definition at line 619 of file serialization.hpp.