AWS SDK for C++
1.8.155
AWS SDK for C++
|
#include <JsonSerializer.h>
Public Member Functions | |
JsonView () | |
JsonView (const JsonValue &v) | |
JsonView & | operator= (const JsonValue &v) |
Aws::String | GetString (const Aws::String &key) const |
Aws::String | AsString () const |
bool | GetBool (const Aws::String &key) const |
bool | AsBool () const |
int | GetInteger (const Aws::String &key) const |
int | AsInteger () const |
int64_t | GetInt64 (const Aws::String &key) const |
int64_t | AsInt64 () const |
double | GetDouble (const Aws::String &key) const |
double | AsDouble () const |
Array< JsonView > | GetArray (const Aws::String &key) const |
Array< JsonView > | AsArray () const |
JsonView | GetObject (const Aws::String &key) const |
JsonView | AsObject () const |
Aws::Map< Aws::String, JsonView > | GetAllObjects () const |
bool | ValueExists (const Aws::String &key) const |
bool | KeyExists (const Aws::String &key) const |
bool | IsObject () const |
bool | IsBool () const |
bool | IsString () const |
bool | IsIntegerType () const |
bool | IsFloatingPointType () const |
bool | IsListType () const |
bool | IsNull () const |
Aws::String | WriteCompact (bool treatAsObject=true) const |
Aws::String | WriteReadable (bool treatAsObject=true) const |
JsonValue | Materialize () const |
Provides read-only view to an existing JsonValue. This allows lightweight copying without making deep copies of the JsonValue. Note: This class does not extend the lifetime of the given JsonValue. It's your responsibility to ensure the lifetime of the JsonValue is extended beyond the lifetime of its view.
Definition at line 221 of file JsonSerializer.h.
Aws::Utils::Json::JsonView::JsonView | ( | ) |
Aws::Utils::Json::JsonView::JsonView | ( | const JsonValue & | v | ) |
Returns the value of this node as an array of JsonView objects.
bool Aws::Utils::Json::JsonView::AsBool | ( | ) | const |
Returns the value of this node as a boolean.
double Aws::Utils::Json::JsonView::AsDouble | ( | ) | const |
Returns the value of this node as a double precision floating-point.
int64_t Aws::Utils::Json::JsonView::AsInt64 | ( | ) | const |
Returns the value of this node as 64-bit integer.
int Aws::Utils::Json::JsonView::AsInteger | ( | ) | const |
Returns the value of this node as an int.
JsonView Aws::Utils::Json::JsonView::AsObject | ( | ) | const |
Returns the value of this node as a JsonView object.
Aws::String Aws::Utils::Json::JsonView::AsString | ( | ) | const |
Returns the value of this node as a string. The behavior is undefined if the node is not of type string.
Aws::Map<Aws::String, JsonView> Aws::Utils::Json::JsonView::GetAllObjects | ( | ) | const |
Reads all json objects at the top level of this node (does not traverse the tree any further) along with their keys.
Array<JsonView> Aws::Utils::Json::JsonView::GetArray | ( | const Aws::String & | key | ) | const |
Gets an array of JsonView objects from this node by its key.
bool Aws::Utils::Json::JsonView::GetBool | ( | const Aws::String & | key | ) | const |
Gets a boolean value from this node by its key.
double Aws::Utils::Json::JsonView::GetDouble | ( | const Aws::String & | key | ) | const |
Gets a double precision floating-point value from this node by its key.
int64_t Aws::Utils::Json::JsonView::GetInt64 | ( | const Aws::String & | key | ) | const |
Gets a 64-bit integer value from this node by its key. The value is 64-bit regardless of the platform/machine.
int Aws::Utils::Json::JsonView::GetInteger | ( | const Aws::String & | key | ) | const |
Gets an integer value from this node by its key. The integer is of the same size as an int on the machine.
JsonView Aws::Utils::Json::JsonView::GetObject | ( | const Aws::String & | key | ) | const |
Gets a JsonView object from this node by its key.
Aws::String Aws::Utils::Json::JsonView::GetString | ( | const Aws::String & | key | ) | const |
Gets a string from this node by its key.
bool Aws::Utils::Json::JsonView::IsBool | ( | ) | const |
Tests whether the current value is a boolean.
bool Aws::Utils::Json::JsonView::IsFloatingPointType | ( | ) | const |
Tests whether the current value is a floating-point.
bool Aws::Utils::Json::JsonView::IsIntegerType | ( | ) | const |
Tests whether the current value is an int or int64_t. Returns false if the value is floating-point.
bool Aws::Utils::Json::JsonView::IsListType | ( | ) | const |
Tests whether the current value is a JSON array.
bool Aws::Utils::Json::JsonView::IsNull | ( | ) | const |
Tests whether the current value is NULL.
bool Aws::Utils::Json::JsonView::IsObject | ( | ) | const |
Tests whether the current value is a JSON object.
bool Aws::Utils::Json::JsonView::IsString | ( | ) | const |
Tests whether the current value is a string.
bool Aws::Utils::Json::JsonView::KeyExists | ( | const Aws::String & | key | ) | const |
Tests whether a key exists at the current node level.
JsonValue Aws::Utils::Json::JsonView::Materialize | ( | ) | const |
Creates a deep copy of the JSON value rooted in the current JSON view.
bool Aws::Utils::Json::JsonView::ValueExists | ( | const Aws::String & | key | ) | const |
Tests whether a value exists at the current node level for the given key. Returns true if a value has been found and its value is not null, false otherwise.
Aws::String Aws::Utils::Json::JsonView::WriteCompact | ( | bool | treatAsObject = true | ) | const |
Writes the current JSON view without whitespace characters starting at the current level to a string.
treatAsObject | if the current value is empty, writes out '{}' rather than an empty string. |
Aws::String Aws::Utils::Json::JsonView::WriteReadable | ( | bool | treatAsObject = true | ) | const |
Writes the current JSON view to a string in a human friendly format.
treatAsObject | if the current value is empty, writes out '{}' rather than an empty string. |