|
AWS IoT Device SDK C++ v2
1.40.1
AWS IoT Device SDK C++ v2
|
#include <JsonObject.h>
Public Member Functions | |
| JsonObject () | |
| JsonObject (const String &stringToParse) | |
| JsonObject (const JsonObject &other) | |
| JsonObject (JsonObject &&other) noexcept | |
| ~JsonObject () | |
| JsonObject & | operator= (const JsonObject &other) |
| JsonObject & | operator= (JsonObject &&other) noexcept |
| bool | operator== (const JsonObject &other) const |
| bool | operator!= (const JsonObject &other) const |
| JsonObject & | WithString (const String &key, const String &value) |
| JsonObject & | WithString (const char *key, const String &value) |
| JsonObject & | AsString (const String &value) |
| JsonObject & | WithBool (const String &key, bool value) |
| JsonObject & | WithBool (const char *key, bool value) |
| JsonObject & | AsBool (bool value) |
| JsonObject & | WithInteger (const String &key, int value) |
| JsonObject & | WithInteger (const char *key, int value) |
| JsonObject & | AsInteger (int value) |
| JsonObject & | WithInt64 (const String &key, int64_t value) |
| JsonObject & | WithInt64 (const char *key, int64_t value) |
| JsonObject & | AsInt64 (int64_t value) |
| JsonObject & | WithDouble (const String &key, double value) |
| JsonObject & | WithDouble (const char *key, double value) |
| JsonObject & | AsDouble (double value) |
| JsonObject & | WithArray (const String &key, const Vector< String > &array) |
| JsonObject & | WithArray (const char *key, const Vector< String > &array) |
| JsonObject & | WithArray (const String &key, const Vector< JsonObject > &array) |
| JsonObject & | WithArray (const String &key, Vector< JsonObject > &&array) |
| JsonObject & | AsArray (const Vector< JsonObject > &array) |
| JsonObject & | AsArray (Vector< JsonObject > &&array) |
| JsonObject & | AsNull () |
| JsonObject & | WithObject (const String &key, const JsonObject &value) |
| JsonObject & | WithObject (const char *key, const JsonObject &value) |
| JsonObject & | WithObject (const String &key, JsonObject &&value) |
| JsonObject & | WithObject (const char *key, JsonObject &&value) |
| JsonObject & | AsObject (const JsonObject &value) |
| JsonObject & | AsObject (JsonObject &&value) |
| bool | WasParseSuccessful () const |
| const String & | GetErrorMessage () const |
| JsonView | View () const |
Friends | |
| class | JsonView |
| class | ApiHandle |
JSON DOM manipulation class. To read or serialize use View function.
| Aws::Crt::JsonObject::JsonObject | ( | ) |
Constructs empty JSON DOM.
| Aws::Crt::JsonObject::JsonObject | ( | const String & | stringToParse | ) |
Constructs a JSON DOM by parsing the input string. Call WasParseSuccessful() on new object to determine if parse was successful.
| Aws::Crt::JsonObject::JsonObject | ( | const JsonObject & | other | ) |
Construct a deep copy. Prefer using a JsonView if copying is not needed.
|
noexcept |
Move constructor. No copying is performed.
| Aws::Crt::JsonObject::~JsonObject | ( | ) |
| JsonObject & Aws::Crt::JsonObject::AsArray | ( | const Vector< JsonObject > & | array | ) |
Converts the current JSON node to an array whose values are deep-copied from the array parameter.
| JsonObject & Aws::Crt::JsonObject::AsArray | ( | Vector< JsonObject > && | array | ) |
Converts the current JSON node to an array whose values are moved from the array parameter.
| JsonObject & Aws::Crt::JsonObject::AsBool | ( | bool | value | ) |
Converts the current JSON node to a bool.
| JsonObject & Aws::Crt::JsonObject::AsDouble | ( | double | value | ) |
Converts the current JSON node to a number.
| JsonObject & Aws::Crt::JsonObject::AsInt64 | ( | int64_t | value | ) |
Converts the current JSON node to a number. Precision may be lost.
| JsonObject & Aws::Crt::JsonObject::AsInteger | ( | int | value | ) |
Converts the current JSON node to a number. Precision may be lost.
| JsonObject & Aws::Crt::JsonObject::AsNull | ( | ) |
Sets the current JSON node as null.
| JsonObject & Aws::Crt::JsonObject::AsObject | ( | const JsonObject & | value | ) |
Converts the current JSON node to a JSON object by deep-copying the parameter.
| JsonObject & Aws::Crt::JsonObject::AsObject | ( | JsonObject && | value | ) |
Converts the current JSON node to a JSON object by moving from the parameter.
| JsonObject & Aws::Crt::JsonObject::AsString | ( | const String & | value | ) |
Converts the current JSON node to a string.
| const String & Aws::Crt::JsonObject::GetErrorMessage | ( | ) | const |
| bool Aws::Crt::JsonObject::operator!= | ( | const JsonObject & | other | ) | const |
| JsonObject & Aws::Crt::JsonObject::operator= | ( | const JsonObject & | other | ) |
Performs a deep copy.
|
noexcept |
Moves the ownership of the internal JSON DOM of the parameter to the current object. No copying is performed. A DOM currently owned by the object will be freed prior to copying.
| bool Aws::Crt::JsonObject::operator== | ( | const JsonObject & | other | ) | const |
| JsonView Aws::Crt::JsonObject::View | ( | ) | const |
Creates a view of this JSON node.
|
inline |
Returns true if the last parse request was successful.
| JsonObject & Aws::Crt::JsonObject::WithArray | ( | const char * | key, |
| const Vector< String > & | array | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithArray | ( | const String & | key, |
| const Vector< JsonObject > & | array | ||
| ) |
Adds an array of arbitrary JSON objects to the top level of this node at key. The values in the array parameter will be deep-copied.
| JsonObject & Aws::Crt::JsonObject::WithArray | ( | const String & | key, |
| const Vector< String > & | array | ||
| ) |
Adds an array of strings to the top level of this node at key.
| JsonObject & Aws::Crt::JsonObject::WithArray | ( | const String & | key, |
| Vector< JsonObject > && | array | ||
| ) |
Adds an array of arbitrary JSON objects to the top level of this node at key. The values in the array parameter will be moved-from.
| JsonObject & Aws::Crt::JsonObject::WithBool | ( | const char * | key, |
| bool | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithBool | ( | const String & | key, |
| bool | value | ||
| ) |
Adds a bool value with key to the top level of this node.
| JsonObject & Aws::Crt::JsonObject::WithDouble | ( | const char * | key, |
| double | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithDouble | ( | const String & | key, |
| double | value | ||
| ) |
Adds a number value at key at the top level of this node.
| JsonObject & Aws::Crt::JsonObject::WithInt64 | ( | const char * | key, |
| int64_t | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithInt64 | ( | const String & | key, |
| int64_t | value | ||
| ) |
Adds a number value at key to the top level of this node. Precision may be lost.
| JsonObject & Aws::Crt::JsonObject::WithInteger | ( | const char * | key, |
| int | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithInteger | ( | const String & | key, |
| int | value | ||
| ) |
Adds a number value at key at the top level of this node. Precision may be lost.
| JsonObject & Aws::Crt::JsonObject::WithObject | ( | const char * | key, |
| const JsonObject & | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithObject | ( | const char * | key, |
| JsonObject && | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithObject | ( | const String & | key, |
| const JsonObject & | value | ||
| ) |
Adds a JSON object to the top level of this node at key. The object parameter is deep-copied.
| JsonObject & Aws::Crt::JsonObject::WithObject | ( | const String & | key, |
| JsonObject && | value | ||
| ) |
Adds a JSON object to the top level of this node at key.
| JsonObject & Aws::Crt::JsonObject::WithString | ( | const char * | key, |
| const String & | value | ||
| ) |
| JsonObject & Aws::Crt::JsonObject::WithString | ( | const String & | key, |
| const String & | value | ||
| ) |
Adds a string to the top level of this node with key.
|
friend |
|
friend |