CMSC23700 Common Code Library
Support code for CS23700 programming projects
Loading...
Searching...
No Matches
json::Value Class Referenceabstract

#include <json.hpp>

Inheritance diagram for json::Value:

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 ObjectasObject () const
 dynamic cast to JSON object
 
const ArrayasArray () const
 dynamic cast to JSON array
 
const NumberasNumber () const
 dynamic cast to JSON number
 
const IntegerasInteger () const
 dynamic cast to JSON integer
 
const RealasReal () const
 dynamic cast to JSON real number
 
const StringasString () const
 dynamic cast to JSON string
 
const BoolasBool () const
 dynamic cast to JSON boolean
 
virtual ~Value ()
 
virtual std::string toString ()=0
 

Protected Member Functions

 Value (Type ty)
 

Protected Attributes

Type _ty
 

Constructor & Destructor Documentation

◆ ~Value()

virtual json::Value::~Value ( )
virtual

◆ Value()

json::Value::Value ( Type  ty)
inlineexplicitprotected

Member Function Documentation

◆ asArray()

const Array * json::Value::asArray ( ) const

dynamic cast to JSON array

◆ asBool()

const Bool * json::Value::asBool ( ) const

dynamic cast to JSON boolean

◆ asInteger()

const Integer * json::Value::asInteger ( ) const

dynamic cast to JSON integer

◆ asNumber()

const Number * json::Value::asNumber ( ) const

dynamic cast to JSON number

◆ asObject()

const Object * json::Value::asObject ( ) const

dynamic cast to JSON object

◆ asReal()

const Real * json::Value::asReal ( ) const

dynamic cast to JSON real number

◆ asString()

const String * json::Value::asString ( ) const

dynamic cast to JSON string

◆ isArray()

bool json::Value::isArray ( ) const
inline

return true if this value is an array

◆ isBool()

bool json::Value::isBool ( ) const
inline

return true if this value is a boolean

◆ isInteger()

bool json::Value::isInteger ( ) const
inline

return true if this value is an integer

◆ isNull()

bool json::Value::isNull ( ) const
inline

return true if this value is the null value

◆ isNumber()

bool json::Value::isNumber ( ) const
inline

return true if this value is a number

◆ isObject()

bool json::Value::isObject ( ) const
inline

return true if this value is an object

◆ isReal()

bool json::Value::isReal ( ) const
inline

return true if this value is a real number

◆ isString()

bool json::Value::isString ( ) const
inline

return true if this value is a string

◆ toString()

virtual std::string json::Value::toString ( )
pure virtual

◆ type()

Type json::Value::type ( ) const
inline

return the type of this JSON value

Member Data Documentation

◆ _ty

Type json::Value::_ty
protected

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