![]() |
CMSC23740 Common Code Library
Support code for CS23740 programming projects
|
#include <json.hpp>

Public Member Functions | |
| Type | type () const |
| return the type of this JSON value | |
| bool | isObject () const |
| return true if this value is an object | |
| bool | isArray () const |
| return true if this value is an array | |
| bool | isNumber () const |
| return true if this value is a number | |
| bool | isInteger () const |
| return true if this value is an integer | |
| bool | isReal () const |
| return true if this value is a real number | |
| bool | isString () const |
| return true if this value is a string | |
| bool | isBool () const |
| return true if this value is a boolean | |
| bool | isNull () const |
| return true if this value is the null value | |
| const Object * | asObject () const |
| dynamic cast to JSON object | |
| const Array * | asArray () const |
| dynamic cast to JSON array | |
| const Number * | asNumber () const |
| dynamic cast to JSON number | |
| const Integer * | asInteger () const |
| dynamic cast to JSON integer | |
| const Real * | asReal () const |
| dynamic cast to JSON real number | |
| const String * | asString () const |
| dynamic cast to JSON string | |
| const Bool * | asBool () const |
| dynamic cast to JSON boolean | |
| virtual | ~Value () |
| virtual std::string | toString ()=0 |
Protected Member Functions | |
| Value (Type ty) | |
Protected Attributes | |
| Type | _ty |
|
virtual |
|
inlineexplicitprotected |
| const Array * json::Value::asArray | ( | ) | const |
dynamic cast to JSON array
| const Bool * json::Value::asBool | ( | ) | const |
dynamic cast to JSON boolean
| const Integer * json::Value::asInteger | ( | ) | const |
dynamic cast to JSON integer
| const Number * json::Value::asNumber | ( | ) | const |
dynamic cast to JSON number
| const Object * json::Value::asObject | ( | ) | const |
dynamic cast to JSON object
| const Real * json::Value::asReal | ( | ) | const |
dynamic cast to JSON real number
| const String * json::Value::asString | ( | ) | const |
dynamic cast to JSON string
|
inline |
return true if this value is an array
|
inline |
return true if this value is a boolean
|
inline |
return true if this value is an integer
|
inline |
return true if this value is the null value
|
inline |
return true if this value is a number
|
inline |
return true if this value is an object
|
inline |
return true if this value is a real number
|
inline |
return true if this value is a string
|
pure virtual |
Implemented in json::Array, json::Bool, json::Integer, json::Null, json::Number, json::Object, json::Real, and json::String.
|
inline |
return the type of this JSON value
|
protected |