Cthulhu  0.2.10
Cthulhu compiler collection
ctu::json::Object Class Reference

a json object value More...

#include <json.hpp>

Public Member Functions

Json get (const char *key) const
 get a value access a value from the object by key More...
 
Json operator[] (const char *key) const
 get a value same as get More...
 
ObjectIterator begin () const
 start iterating iterate over the members of the object More...
 
ObjectIterator end () const
 end iterating More...
 
ObjectIterator iter () const
 

Friends

class Json
 

Detailed Description

a json object value

Definition at line 26 of file json.hpp.

Member Function Documentation

◆ begin()

ObjectIterator Object::begin ( ) const

start iterating iterate over the members of the object

Warning
the order of iteration is not guaranteed
Returns
the start of the iteration

Definition at line 17 of file json.cpp.

◆ end()

ObjectIterator Object::end ( ) const

end iterating

Returns
the end of the iteration

Definition at line 18 of file json.cpp.

◆ get()

Json Object::get ( const char *  key) const

get a value access a value from the object by key

Note
if the key does not exist an invalid json value is returned
Parameters
keythe key to access
Returns
the value at key

Definition at line 14 of file json.cpp.

◆ iter()

ObjectIterator Object::iter ( ) const

Definition at line 20 of file json.cpp.

◆ operator[]()

Json Object::operator[] ( const char *  key) const

get a value same as get

Parameters
keythe key to access
Returns
the value at key

Definition at line 15 of file json.cpp.

Friends And Related Function Documentation

◆ Json

friend class Json
friend

Definition at line 27 of file json.hpp.


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