CppSerialization 1.0.6.0
C++ Serialization Library
Loading...
Searching...
No Matches
CppSerialization::JSON::Deserializer Class Reference

JSON deserializer. More...

#include <deserializer.h>

Public Member Functions

 Deserializer ()=delete
 Deserializer (const Deserializer &)=delete
 Deserializer (Deserializer &&)=delete
 ~Deserializer ()=delete
Deserializeroperator= (const Deserializer &)=delete
Deserializeroperator= (Deserializer &&)=delete

Static Public Member Functions

template<typename JSON>
static bool Find (const JSON &json, const char *key, bool &value)
 Try to get the boolean key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, int &value)
 Try to get the integer key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, unsigned &value)
 Try to get the unsigned key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, int64_t &value)
 Try to get the 64-bit integer key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, uint64_t &value)
 Try to get the 64-bit unsigned key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, double &value)
 Try to get the double key/value pair.
template<typename JSON>
static bool Find (const JSON &json, const char *key, char *value, size_t size)
 Try to get the C-string key/value pair with a given size.
template<typename JSON>
static bool Find (const JSON &json, const char *key, std::string &value)
 Try to get the string key/value pair.
template<typename JSON, std::size_t N>
static bool Find (const JSON &json, const char *key, char(&value)[N])
 Try to get the fixed string array key/value pair.
template<typename JSON>
static bool FindArray (const JSON &json, const char *key, const std::function< void(const Value &)> &handler)
 Try to get the array key/value pair.
template<typename JSON>
static bool FindArray (const JSON &json, const char *key, const std::function< void(size_t)> &initialize, const std::function< void(const Value &)> &handler)
 Try to get the array key/value pair with array initialize handler.
template<typename JSON>
static bool FindObject (const JSON &json, const char *key, const std::function< void(const Value::ConstObject &)> &handler)
 Try to get the object key/value pair.

Detailed Description

JSON deserializer.

JSON deserializer is used to deserialize objects from the JSON document.

Definition at line 25 of file deserializer.h.

Constructor & Destructor Documentation

◆ Deserializer() [1/3]

CppSerialization::JSON::Deserializer::Deserializer ( )
delete

◆ Deserializer() [2/3]

CppSerialization::JSON::Deserializer::Deserializer ( const Deserializer & )
delete

◆ Deserializer() [3/3]

CppSerialization::JSON::Deserializer::Deserializer ( Deserializer && )
delete

◆ ~Deserializer()

CppSerialization::JSON::Deserializer::~Deserializer ( )
delete

Member Function Documentation

◆ Find() [1/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
bool & value )
inlinestatic

Try to get the boolean key/value pair.

Definition at line 13 of file deserializer.inl.

◆ Find() [2/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
char * value,
size_t size )
inlinestatic

Try to get the C-string key/value pair with a given size.

Definition at line 115 of file deserializer.inl.

◆ Find() [3/9]

template<typename JSON, std::size_t N>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
char(&) value[N] )
inlinestatic

Try to get the fixed string array key/value pair.

Definition at line 153 of file deserializer.inl.

◆ Find() [4/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
double & value )
inlinestatic

Try to get the double key/value pair.

Definition at line 98 of file deserializer.inl.

◆ Find() [5/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
int & value )
inlinestatic

Try to get the integer key/value pair.

Definition at line 30 of file deserializer.inl.

◆ Find() [6/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
int64_t & value )
inlinestatic

Try to get the 64-bit integer key/value pair.

Definition at line 64 of file deserializer.inl.

◆ Find() [7/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
std::string & value )
inlinestatic

Try to get the string key/value pair.

Definition at line 136 of file deserializer.inl.

◆ Find() [8/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
uint64_t & value )
inlinestatic

Try to get the 64-bit unsigned key/value pair.

Definition at line 81 of file deserializer.inl.

◆ Find() [9/9]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::Find ( const JSON & json,
const char * key,
unsigned & value )
inlinestatic

Try to get the unsigned key/value pair.

Definition at line 47 of file deserializer.inl.

◆ FindArray() [1/2]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::FindArray ( const JSON & json,
const char * key,
const std::function< void(const Value &)> & handler )
inlinestatic

Try to get the array key/value pair.

Definition at line 174 of file deserializer.inl.

◆ FindArray() [2/2]

template<typename JSON>
bool CppSerialization::JSON::Deserializer::FindArray ( const JSON & json,
const char * key,
const std::function< void(size_t)> & initialize,
const std::function< void(const Value &)> & handler )
inlinestatic

Try to get the array key/value pair with array initialize handler.

Definition at line 181 of file deserializer.inl.

◆ FindObject()

template<typename JSON>
bool CppSerialization::JSON::Deserializer::FindObject ( const JSON & json,
const char * key,
const std::function< void(const Value::ConstObject &)> & handler )
inlinestatic

Try to get the object key/value pair.

Definition at line 205 of file deserializer.inl.

◆ operator=() [1/2]

Deserializer & CppSerialization::JSON::Deserializer::operator= ( const Deserializer & )
delete

◆ operator=() [2/2]

Deserializer & CppSerialization::JSON::Deserializer::operator= ( Deserializer && )
delete

The documentation for this class was generated from the following files: