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

JSON arrays. More...

#include <json.hpp>

Inheritance diagram for json::Array:
Collaboration diagram for json::Array:

Public Member Functions

 Array ()
 
 ~Array ()
 
int length () const
 
void add (Value *v)
 
Valueoperator[] (int idx) const
 
std::string toString ()
 
- Public Member Functions inherited from json::Value
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 ()
 

Additional Inherited Members

- Protected Member Functions inherited from json::Value
 Value (Type ty)
 
- Protected Attributes inherited from json::Value
Type _ty
 

Detailed Description

JSON arrays.

Constructor & Destructor Documentation

◆ Array()

json::Array::Array ( )
inline

◆ ~Array()

json::Array::~Array ( )

Member Function Documentation

◆ add()

void json::Array::add ( Value v)
inline

◆ length()

int json::Array::length ( ) const
inline

◆ operator[]()

Value * json::Array::operator[] ( int  idx) const
inline

◆ toString()

std::string json::Array::toString ( )
virtual

Implements json::Value.


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