CBMC
json_objectt Class Reference

#include <json.h>

+ Inheritance diagram for json_objectt:
+ Collaboration diagram for json_objectt:

Public Types

using value_type = objectt::value_type
 
using iterator = objectt::iterator
 
using const_iterator = objectt::const_iterator
 
- Public Types inherited from jsont
enum class  kindt {
  J_STRING , J_NUMBER , J_OBJECT , J_ARRAY ,
  J_TRUE , J_FALSE , J_NULL
}
 

Public Member Functions

 json_objectt ()
 
 json_objectt (std::initializer_list< typename objectt::value_type > &&initializer_list)
 
template<typename begin_iteratort , typename end_iteratort >
 json_objectt (begin_iteratort &&begin_iterator, end_iteratort &&end_iterator)
 
template<typename iteratort >
 json_objectt (ranget< iteratort > &&range)
 
jsontoperator[] (const std::string &key)
 
const jsontoperator[] (const std::string &key) const
 
iterator insert (const_iterator it, value_type value)
 
iterator find (const std::string &key)
 
const_iterator find (const std::string &key) const
 
std::size_t size () const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
iterator end ()
 
const_iterator end () const
 
const_iterator cend () const
 
- Public Member Functions inherited from jsont
bool is_string () const
 
bool is_number () const
 
bool is_object () const
 
bool is_array () const
 
bool is_boolean () const
 
bool is_true () const
 
bool is_false () const
 
bool is_null () const
 
 jsont ()
 
void output (std::ostream &out) const
 
void swap (jsont &other)
 
void clear ()
 
json_arraytmake_array ()
 
json_objecttmake_object ()
 
const jsontoperator[] (const std::string &key) const
 
void output_rec (std::ostream &, unsigned indent) const
 Recursive printing of the json object. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from jsont
static jsont json_boolean (bool value)
 
static void output_key (std::ostream &out, const std::string &key)
 
static void output_object (std::ostream &out, const objectt &object, unsigned indent)
 Basic handling of the printing of a JSON object. More...
 
- Public Attributes inherited from jsont
kindt kind
 
std::string value
 
- Static Public Attributes inherited from jsont
static const jsont null_json_object
 
- Protected Types inherited from jsont
typedef std::vector< jsontarrayt
 
typedef std::map< std::string, jsontobjectt
 
- Protected Member Functions inherited from jsont
 jsont (kindt _kind)
 
 jsont (kindt _kind, std::string _value)
 
 jsont (kindt _kind, arrayt &&entries)
 
 jsont (kindt _kind, objectt &&objects)
 
- Static Protected Member Functions inherited from jsont
static void escape_string (const std::string &, std::ostream &)
 
- Protected Attributes inherited from jsont
arrayt array
 
objectt object
 

Detailed Description

Definition at line 297 of file json.h.

Member Typedef Documentation

◆ const_iterator

using json_objectt::const_iterator = objectt::const_iterator

Definition at line 302 of file json.h.

◆ iterator

using json_objectt::iterator = objectt::iterator

Definition at line 301 of file json.h.

◆ value_type

using json_objectt::value_type = objectt::value_type

Definition at line 300 of file json.h.

Constructor & Destructor Documentation

◆ json_objectt() [1/4]

json_objectt::json_objectt ( )
inline

Definition at line 304 of file json.h.

◆ json_objectt() [2/4]

json_objectt::json_objectt ( std::initializer_list< typename objectt::value_type > &&  initializer_list)
inlineexplicit

Definition at line 308 of file json.h.

◆ json_objectt() [3/4]

template<typename begin_iteratort , typename end_iteratort >
json_objectt::json_objectt ( begin_iteratort &&  begin_iterator,
end_iteratort &&  end_iterator 
)
inline

Definition at line 315 of file json.h.

◆ json_objectt() [4/4]

template<typename iteratort >
json_objectt::json_objectt ( ranget< iteratort > &&  range)
inlineexplicit

Definition at line 330 of file json.h.

Member Function Documentation

◆ begin() [1/2]

iterator json_objectt::begin ( )
inline

Definition at line 369 of file json.h.

◆ begin() [2/2]

const_iterator json_objectt::begin ( ) const
inline

Definition at line 374 of file json.h.

◆ cbegin()

const_iterator json_objectt::cbegin ( ) const
inline

Definition at line 379 of file json.h.

◆ cend()

const_iterator json_objectt::cend ( ) const
inline

Definition at line 394 of file json.h.

◆ end() [1/2]

iterator json_objectt::end ( )
inline

Definition at line 384 of file json.h.

◆ end() [2/2]

const_iterator json_objectt::end ( ) const
inline

Definition at line 389 of file json.h.

◆ find() [1/2]

iterator json_objectt::find ( const std::string &  key)
inline

Definition at line 354 of file json.h.

◆ find() [2/2]

const_iterator json_objectt::find ( const std::string &  key) const
inline

Definition at line 359 of file json.h.

◆ insert()

iterator json_objectt::insert ( const_iterator  it,
value_type  value 
)
inline

Definition at line 349 of file json.h.

◆ operator[]() [1/2]

jsont& json_objectt::operator[] ( const std::string &  key)
inline

Definition at line 335 of file json.h.

◆ operator[]() [2/2]

const jsont& json_objectt::operator[] ( const std::string &  key) const
inline

Definition at line 340 of file json.h.

◆ size()

std::size_t json_objectt::size ( ) const
inline

Definition at line 364 of file json.h.


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