JSON value instances.
More...
|
class | jsonv::kind_error |
| Thrown from various value methods when attempting to perform an operation which is not valid for the kind of value. More...
|
|
class | jsonv::value |
| Represents a single JSON value, which can be any one of a potential kind , each behaving slightly differently. More...
|
|
class | jsonv::object_node_handle |
| A node handle used when a value is kind::object to access elements of the object in potentially destructive manner. More...
|
|
|
enum | jsonv::kind : unsigned char {
null,
object,
array,
string,
integer,
decimal,
boolean
} |
| Describes the kind of data a value holds. More...
|
|
JSON value instances.
Describes the kind of data a value
holds.
See value
for more information.
- See also
- http://json.org/
Definition at line 69 of file value.hpp.
Create an empty array value.
Create an array value from the given source.
template<typename TForwardIterator >
value jsonv::array |
( |
TForwardIterator |
first, |
|
|
TForwardIterator |
last |
|
) |
| |
Create an array with contents defined by range [first, last).
Definition at line 1023 of file value.hpp.
JSONV_PUBLIC value jsonv::object |
( |
std::initializer_list< std::pair< std::string, value >> |
source | ) |
|
Create an object with key-value pairs from the given source.
template<typename TForwardIterator >
value jsonv::object |
( |
TForwardIterator |
first, |
|
|
TForwardIterator |
last |
|
) |
| |
Create an object whose contents are defined by range [first, last).
Definition at line 1039 of file value.hpp.
JSONV_PUBLIC value jsonv::operator""_json |
( |
const char * |
str, |
|
|
std::size_t |
len |
|
) |
| |
A user-defined literal for parsing JSON.
Uses the default (non-strict) parse_options
.
R"({
"taco": "cat",
"burrito": "dog",
"whatever": [ "goes", "here", 1, 2, 3, 4 ]
})"_json;
Print out the name of the kind
.
Get the name of the kind
.
Get a string representation of the given value
.
An instance with kind::null
.
This is intended to be used for convenience and readability (as opposed to using the default constructor of value
.