Loading...
Searching...
No Matches
Public Types |
Public Member Functions |
Static Public Member Functions |
Public Attributes |
List of all members
opennn::Json Class Reference
#include <json.h>
Public Types | |
| enum class | Kind { Null , Bool , Number , String , Array , Object } |
Public Member Functions | |
| Json ()=default | |
| Json (bool b) | |
| Json (int i) | |
| Json (long i) | |
| Json (long long i) | |
| Json (unsigned int i) | |
| Json (unsigned long i) | |
| Json (unsigned long long i) | |
| Json (double d) | |
| Json (float d) | |
| Json (const char *s) | |
| Json (const string &s) | |
| bool | is_null () const |
| bool | is_bool () const |
| bool | is_number () const |
| bool | is_string () const |
| bool | is_array () const |
| bool | is_object () const |
| bool | has (const string &key) const |
| const Json * | find (const string &key) const |
| const Json * | first_child (const string &key) const |
| const Json & | at (const string &key) const |
| Json & | operator[] (const string &key) |
| Json & | set (const string &key, Json value) |
| void | push_back (Json value) |
| string | as_string () const |
| long | as_long () const |
| double | as_double () const |
| bool | as_bool () const |
| string | dump (int indent=2) const |
Static Public Member Functions | |
| static Json | make_object () |
| static Json | make_array () |
| static Json | parse (const string &text) |
Public Attributes | |
| Kind | kind = Kind::Null |
| bool | bool_value = false |
| double | number_value = 0.0 |
| string | string_value |
| vector< Json > | array_value |
| vector< pair< string, Json > > | object_value |
Member Enumeration Documentation
◆ Kind
|
strong |
Constructor & Destructor Documentation
◆ Json() [1/12]
|
default |
◆ Json() [2/12]
|
inline |
◆ Json() [3/12]
|
inline |
◆ Json() [4/12]
|
inline |
◆ Json() [5/12]
|
inline |
◆ Json() [6/12]
|
inline |
◆ Json() [7/12]
|
inline |
◆ Json() [8/12]
|
inline |
◆ Json() [9/12]
|
inline |
◆ Json() [10/12]
|
inline |
◆ Json() [11/12]
|
inline |
◆ Json() [12/12]
|
inline |
Member Function Documentation
◆ as_bool()
|
nodiscard |
◆ as_double()
|
nodiscard |
◆ as_long()
|
nodiscard |
◆ as_string()
|
nodiscard |
◆ at()
|
nodiscard |
◆ dump()
|
nodiscard |
◆ find()
|
nodiscard |
◆ first_child()
|
inlinenodiscard |
◆ has()
|
nodiscard |
◆ is_array()
|
inlinenodiscard |
◆ is_bool()
|
inlinenodiscard |
◆ is_null()
|
inlinenodiscard |
◆ is_number()
|
inlinenodiscard |
◆ is_object()
|
inlinenodiscard |
◆ is_string()
|
inlinenodiscard |
◆ make_array()
|
staticnodiscard |
◆ make_object()
|
staticnodiscard |
◆ operator[]()
| Json & opennn::Json::operator[] | ( | const string & | key | ) |
◆ parse()
|
staticnodiscard |
◆ push_back()
| void opennn::Json::push_back | ( | Json | value | ) |
◆ set()
Member Data Documentation
◆ array_value
| vector<Json> opennn::Json::array_value |
◆ bool_value
| bool opennn::Json::bool_value = false |
◆ kind
| Kind opennn::Json::kind = Kind::Null |
◆ number_value
| double opennn::Json::number_value = 0.0 |
◆ object_value
| vector<pair<string, Json> > opennn::Json::object_value |
◆ string_value
| string opennn::Json::string_value |