NDDEM
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
nddem::JsonValue Struct Reference

#include <json_parser.h>

Classes

class  JsonParser
 

Public Types

enum class  Type {
  Null , Bool , Number , String ,
  Array , Object , Null , Bool ,
  Number , String , Array , Object
}
 
enum class  Type {
  Null , Bool , Number , String ,
  Array , Object , Null , Bool ,
  Number , String , Array , Object
}
 

Public Member Functions

 JsonValue ()
 
 JsonValue (double n)
 
 JsonValue (bool b)
 
 JsonValue (std::string s)
 
 JsonValue (JsonArray a)
 
 JsonValue (JsonObject o)
 
bool is_number ()
 
bool is_string ()
 
bool is_array ()
 
bool is_object ()
 
JsonValueoperator[] (std::string key)
 
template<typename T >
get ()
 
auto begin ()
 
auto end ()
 
size_t size ()
 
JsonValueoperator[] (size_t id)
 
bool exist (std::string key)
 
JsonObjectitems ()
 
 JsonValue ()
 
 JsonValue (double n)
 
 JsonValue (bool b)
 
 JsonValue (std::string s)
 
 JsonValue (JsonArray a)
 
 JsonValue (JsonObject o)
 
bool is_number ()
 
bool is_string ()
 
bool is_array ()
 
bool is_object ()
 
JsonValueoperator[] (std::string key)
 
template<typename T >
get ()
 
auto begin ()
 
auto end ()
 
size_t size ()
 
JsonValueoperator[] (size_t id)
 
bool exist (std::string key)
 
JsonObjectitems ()
 
template<>
JsonValue get ()
 
template<>
bool get ()
 
template<>
int get ()
 
template<>
double get ()
 
template<>
JsonValue get ()
 
template<>
bool get ()
 
template<>
int get ()
 
template<>
double get ()
 
template<>
std::string get ()
 
template<>
std::vector< double > get ()
 
template<>
std::vector< int > get ()
 
template<>
std::vector< bool > get ()
 
template<>
std::vector< std::string > get ()
 
template<>
std::vector< std::vector< double > > get ()
 
template<>
std::map< std::string, std::string > get ()
 

Static Public Member Functions

static JsonValue parse (std::string &val)
 
static JsonValue parse (std::string &val)
 

Public Attributes

enum nddem::JsonValue::Type type
 
double number_value = 0.0
 
bool bool_value = false
 
std::string string_value
 
JsonArray array_value
 
JsonObject object_value
 

Member Enumeration Documentation

◆ Type [1/2]

Enumerator
Null 
Bool 
Number 
String 
Array 
Object 
Null 
Bool 
Number 
String 
Array 
Object 

◆ Type [2/2]

Enumerator
Null 
Bool 
Number 
String 
Array 
Object 
Null 
Bool 
Number 
String 
Array 
Object 

Constructor & Destructor Documentation

◆ JsonValue() [1/12]

nddem::JsonValue::JsonValue ( )
inline

◆ JsonValue() [2/12]

nddem::JsonValue::JsonValue ( double  n)
inline

◆ JsonValue() [3/12]

nddem::JsonValue::JsonValue ( bool  b)
inline

◆ JsonValue() [4/12]

nddem::JsonValue::JsonValue ( std::string  s)
inline

◆ JsonValue() [5/12]

nddem::JsonValue::JsonValue ( JsonArray  a)
inline

◆ JsonValue() [6/12]

nddem::JsonValue::JsonValue ( JsonObject  o)
inline

◆ JsonValue() [7/12]

nddem::JsonValue::JsonValue ( )
inline

◆ JsonValue() [8/12]

nddem::JsonValue::JsonValue ( double  n)
inline

◆ JsonValue() [9/12]

nddem::JsonValue::JsonValue ( bool  b)
inline

◆ JsonValue() [10/12]

nddem::JsonValue::JsonValue ( std::string  s)
inline

◆ JsonValue() [11/12]

nddem::JsonValue::JsonValue ( JsonArray  a)
inline

◆ JsonValue() [12/12]

nddem::JsonValue::JsonValue ( JsonObject  o)
inline

Member Function Documentation

◆ begin() [1/2]

auto nddem::JsonValue::begin ( )
inline

◆ begin() [2/2]

auto nddem::JsonValue::begin ( )
inline

◆ end() [1/2]

auto nddem::JsonValue::end ( )
inline

◆ end() [2/2]

auto nddem::JsonValue::end ( )
inline

◆ exist() [1/2]

bool nddem::JsonValue::exist ( std::string  key)

◆ exist() [2/2]

bool nddem::JsonValue::exist ( std::string  key)

◆ get() [1/17]

template<typename T >
T nddem::JsonValue::get ( )
inline

◆ get() [2/17]

template<>
JsonValue nddem::JsonValue::get ( )

◆ get() [3/17]

template<>
bool nddem::JsonValue::get ( )

◆ get() [4/17]

template<>
int nddem::JsonValue::get ( )

◆ get() [5/17]

template<>
double nddem::JsonValue::get ( )

◆ get() [6/17]

template<>
std::string nddem::JsonValue::get ( )

◆ get() [7/17]

template<>
std::vector<double> nddem::JsonValue::get ( )

◆ get() [8/17]

template<>
std::vector<int> nddem::JsonValue::get ( )

◆ get() [9/17]

template<>
std::vector<bool> nddem::JsonValue::get ( )

◆ get() [10/17]

template<>
std::vector<std::string> nddem::JsonValue::get ( )

◆ get() [11/17]

template<>
std::vector<std::vector<double> > nddem::JsonValue::get ( )

◆ get() [12/17]

template<>
std::map<std::string,std::string> nddem::JsonValue::get ( )

◆ get() [13/17]

template<typename T >
T nddem::JsonValue::get ( )
inline

◆ get() [14/17]

template<>
JsonValue nddem::JsonValue::get ( )

◆ get() [15/17]

template<>
bool nddem::JsonValue::get ( )

◆ get() [16/17]

template<>
int nddem::JsonValue::get ( )

◆ get() [17/17]

template<>
double nddem::JsonValue::get ( )

◆ is_array() [1/2]

bool nddem::JsonValue::is_array ( )
inline

◆ is_array() [2/2]

bool nddem::JsonValue::is_array ( )
inline

◆ is_number() [1/2]

bool nddem::JsonValue::is_number ( )
inline

◆ is_number() [2/2]

bool nddem::JsonValue::is_number ( )
inline

◆ is_object() [1/2]

bool nddem::JsonValue::is_object ( )
inline

◆ is_object() [2/2]

bool nddem::JsonValue::is_object ( )
inline

◆ is_string() [1/2]

bool nddem::JsonValue::is_string ( )
inline

◆ is_string() [2/2]

bool nddem::JsonValue::is_string ( )
inline

◆ items() [1/2]

JsonObject& nddem::JsonValue::items ( )
inline

◆ items() [2/2]

JsonObject& nddem::JsonValue::items ( )
inline

◆ operator[]() [1/4]

JsonValue& nddem::JsonValue::operator[] ( size_t  id)
inline

◆ operator[]() [2/4]

JsonValue& nddem::JsonValue::operator[] ( size_t  id)
inline

◆ operator[]() [3/4]

JsonValue& nddem::JsonValue::operator[] ( std::string  key)

◆ operator[]() [4/4]

JsonValue & nddem::JsonValue::operator[] ( std::string  key)

◆ parse() [1/2]

static JsonValue nddem::JsonValue::parse ( std::string &  val)
inlinestatic

◆ parse() [2/2]

static JsonValue nddem::JsonValue::parse ( std::string &  val)
inlinestatic

◆ size() [1/2]

size_t nddem::JsonValue::size ( )
inline

◆ size() [2/2]

size_t nddem::JsonValue::size ( )
inline

Member Data Documentation

◆ array_value

JsonArray nddem::JsonValue::array_value

◆ bool_value

bool nddem::JsonValue::bool_value = false

◆ number_value

double nddem::JsonValue::number_value = 0.0

◆ object_value

JsonObject nddem::JsonValue::object_value

◆ string_value

std::string nddem::JsonValue::string_value

◆ type

enum nddem::JsonValue::Type nddem::JsonValue::type

The documentation for this struct was generated from the following file: