Handles the reading of JSON data.
More...
#include <JsonObjectHandler.h>
|
virtual bool | Ignore ()=0 |
|
virtual bool | Accept (bool &target)=0 |
|
virtual bool | Accept (AZStd::string &target)=0 |
|
virtual bool | Accept (int &target)=0 |
|
virtual bool | Accept (unsigned &target)=0 |
|
virtual bool | Accept (int64_t &target)=0 |
|
virtual bool | Accept (uint64_t &target)=0 |
|
virtual bool | Accept (double &target)=0 |
|
virtual bool | Accept (JsonKeyHandler keyHandler)=0 |
|
template<class ObjectType > |
bool | Accept (ObjectType &object) |
|
virtual bool | Accept (JsonArrayHandler arrayHandler)=0 |
|
template<class ElementType > |
bool | Accept (AZStd::vector< ElementType > &target) |
|
|
template<class ObjectType > |
static JsonKeyHandler | GetJsonKeyHandler (ObjectType &object) |
|
template<class ObjectType > |
static bool | ReadObject (JsonInputStream &stream, ObjectType &object, AZStd::string &errorMessage) |
|
static bool | ReadObject (JsonInputStream &stream, JsonKeyHandler keyHandler, AZStd::string &) |
|
Handles the reading of JSON data.
◆ Accept() [1/9]
virtual bool AWSCore::JsonReader::Accept |
( |
AZStd::string & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that a string value is expected and provide a location where the value can be stored.
◆ Accept() [2/9]
virtual bool AWSCore::JsonReader::Accept |
( |
bool & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that a boolean value is expected and provide a location where the value can be stored.
◆ Accept() [3/9]
virtual bool AWSCore::JsonReader::Accept |
( |
double & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that a double value is expected and provide a location where the value can be stored.
◆ Accept() [4/9]
virtual bool AWSCore::JsonReader::Accept |
( |
int & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that an int value is expected and provide a location where the value can be stored.
◆ Accept() [5/9]
virtual bool AWSCore::JsonReader::Accept |
( |
int64_t & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that a int64_t value is expected and provide a location where the value can be stored.
◆ Accept() [6/9]
virtual bool AWSCore::JsonReader::Accept |
( |
JsonKeyHandler |
keyHandler | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that an object is expected and provide a JsonKeyHandler function for that object.
◆ Accept() [7/9]
template<class ObjectType >
bool AWSCore::JsonReader::Accept |
( |
ObjectType & |
object | ) |
|
|
inline |
Tell the JsonReaderHandler that an object is expected and provide a location where the value can be stored. ObjectType should implement the following function:
static void OnJsonKey(const char* key, JsonReader& reader)
This function will be called for each of the object's properties. It should call one of the Expect methods on the state object to identify the expected property type and provide a location where the property value can be stored.
◆ Accept() [8/9]
virtual bool AWSCore::JsonReader::Accept |
( |
uint64_t & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that a uint64_t value is expected and provide a location where the value can be stored.
◆ Accept() [9/9]
virtual bool AWSCore::JsonReader::Accept |
( |
unsigned & |
target | ) |
|
|
pure virtual |
Tell the JsonReaderHandler that an unsigned value is expected and provide a location where the value can be stored.
◆ ReadObject() [1/2]
static bool AWSCore::JsonReader::ReadObject |
( |
JsonInputStream & |
stream, |
|
|
JsonKeyHandler |
keyHandler, |
|
|
AZStd::string & |
|
|
) |
| |
|
static |
Read a JSON format object from a stream. The specified JsonKeyHandler will be called for each of the object's properties. It should call one of the Expect methods on the state object to identify the expected property type and provide a location where the property value can be stored.
◆ ReadObject() [2/2]
template<class ObjectType >
static bool AWSCore::JsonReader::ReadObject |
( |
JsonInputStream & |
stream, |
|
|
ObjectType & |
object, |
|
|
AZStd::string & |
errorMessage |
|
) |
| |
|
inlinestatic |
Read a JSON format object from a stream into an object. ObjectType should implement the following function:
static void OnJsonKey(const char* key, JsonReader& reader)
This function will be called for each of the object's properties. It should call one of the Expect methods on the state object to identify the expected property type and provide a location where the property value can be stored.
The documentation for this class was generated from the following file:
- Gems/AWSCore/Code/Include/Framework/JsonObjectHandler.h