value Class
A JSON value represented as a C++ class.
Warning
This topic contains information for the C++ REST SDK 1.0 (codename "Casablanca"). If you are using a later version from the Codeplex Casablanca web page, then use the local documentation at https://casablanca.codeplex.com/documentation.
class value;
Members
Public Typedefs
Name |
Description |
---|---|
const_iterator |
Defined in support for STL algorithms that rely on iterators. This identifies the type of the const iterator. |
const_reverse_iterator |
Defined in support for STL algorithms that rely on iterators. This identifies the type of the const iterator. |
element_vector |
Typedef for the standard container holding array elements. This is used when constructing an array from existing objects. |
field_map |
Typedef for the standard container holding fields. This is used when constructing an object from existing objects. |
iterator |
Defined in support for STL algorithms that rely on iterators. This identifies the type of the non-const iterator. |
reverse_iterator |
Defined in support for STL algorithms that rely on iterators. This identifies the type of the non-const iterator. |
Public Enumerations
Name |
Description |
---|---|
This enumeration represents the various kinds of JSON values. |
Public Constructors
Name |
Description |
---|---|
Overloaded. Constructor creating a null value |
Public Methods
Name |
Description |
---|---|
Overloaded. Create an empty JSON array |
|
Convert the JSON value to a C++ bool, if and only if it is a Boolean value. |
|
Convert the JSON value to a C++ double, if and only if it is a number value. Throws json_exception if the value is not a number |
|
Convert the JSON value to a C++ integer, if and only if it is a number value. Throws json_exception if the value is not a number |
|
Convert the JSON value to a C++ STL string, if and only if it is a string value. |
|
Gets the beginning iterator element for a composite value. |
|
Create a Boolean value |
|
Gets the beginning const iterator element for a composite value. |
|
Gets the end const iterator element for a composite value. |
|
Get the beginning const reverse iterator element for a composite value. |
|
Get the end const reverse iterator element for a composite value. |
|
Gets the end iterator element for a composite value. |
|
Is the current value an array? |
|
Is the current value a Boolean value? |
|
Is the current value a null value? |
|
Is the current value a number value? |
|
Is the current value an object? |
|
Is the current value a string value? |
|
Creates a null value |
|
Overloaded. Creates a number value |
|
Overloaded. Create an object value |
|
Overloaded. Constructor creating a JSON value from an input stream, by parsing its contents. |
|
Gets the beginning reverse iterator element for a composite value. |
|
Gets the end reverse iterator element for a composite value. |
|
Overloaded. Write the current JSON value as a double-byte string to a stream instance. |
|
How many children does the value have? |
|
Create a string value |
|
Serialize the current JSON value to a C++ string. |
|
Access the type of JSON value the current value instance is |
Public Operators
Name |
Description |
---|---|
Compare two JSON values for inequality. |
|
Overloaded. Access a field of a JSON object. |
|
Overloaded. Assignment operator. |
|
Compare two JSON values for equality. |
Requirements
Header: json.h
Namespace: web::json