millijson
Lightweight JSON parser for C++
|
Virtual base class for all JSON types. More...
#include <millijson.hpp>
Public Member Functions | |
virtual Type | type () const =0 |
double | get_number () const |
const std::string & | get_string () const |
bool | get_boolean () const |
const std::unordered_map< std::string, std::shared_ptr< Base > > & | get_object () const |
const std::vector< std::shared_ptr< Base > > & | get_array () const |
Virtual base class for all JSON types.
const std::vector< std::shared_ptr< Base > > & millijson::Base::get_array | ( | ) | const |
bool millijson::Base::get_boolean | ( | ) | const |
this
points to a Boolean
class. double millijson::Base::get_number | ( | ) | const |
this
points to a Number
class. const std::unordered_map< std::string, std::shared_ptr< Base > > & millijson::Base::get_object | ( | ) | const |
this
points to an Object
class. const std::string & millijson::Base::get_string | ( | ) | const |
this
points to a String
class.
|
pure virtual |
Implemented in millijson::Array, millijson::Boolean, millijson::Nothing, millijson::Number, millijson::Object, and millijson::String.