cprover
|
#include <json.h>
Public Types | |
enum | kindt { kindt::J_STRING, kindt::J_NUMBER, kindt::J_OBJECT, kindt::J_ARRAY, kindt::J_TRUE, kindt::J_FALSE, kindt::J_NULL } |
typedef std::vector< jsont > | arrayt |
typedef std::map< std::string, jsont > | objectt |
Public Member Functions | |
bool | is_string () const |
bool | is_number () const |
bool | is_object () const |
bool | is_array () 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_arrayt & | make_array () |
json_objectt & | make_object () |
const jsont & | operator[] (const std::string &key) const |
void | output_rec (std::ostream &, unsigned indent) const |
Recursive printing of the json object. More... | |
Static Public Member Functions | |
static jsont | json_boolean (bool value) |
static void | output_object (std::ostream &out, const objectt &object, unsigned indent) |
Basic handling of the printing of a JSON object. More... | |
static void | output_key (std::ostream &out, const std::string &key) |
Public Attributes | |
kindt | kind |
arrayt | array |
objectt | object |
std::string | value |
Static Public Attributes | |
static const jsont | null_json_object |
Protected Member Functions | |
jsont (kindt _kind) | |
jsont (kindt _kind, std::string _value) | |
Static Protected Member Functions | |
static void | escape_string (const std::string &, std::ostream &) |
typedef std::vector<jsont> jsont::arrayt |
typedef std::map<std::string, jsont> jsont::objectt |
|
strong |
|
inline |
Definition at line 74 of file json.h.
Referenced by json_boolean(), and json_arrayt::push_back().
|
inlineprotected |
|
inline |
|
staticprotected |
Definition at line 15 of file json.cpp.
Referenced by output_key(), and output_rec().
|
inline |
Definition at line 54 of file json.h.
Referenced by java_bytecode_languaget::get_language_options(), java_class_loader_limitt::setup_class_load_limit(), and taint_parser().
|
inline |
|
inline |
Definition at line 69 of file json.h.
Referenced by convert_assert(), convert_decl(), convert_input(), convert_output(), convert_return(), and java_class_loader_limitt::setup_class_load_limit().
|
inline |
|
inline |
Definition at line 49 of file json.h.
References J_OBJECT, and kind.
Referenced by java_bytecode_languaget::get_language_options().
|
inline |
Definition at line 39 of file json.h.
References J_STRING, and kind.
Referenced by java_bytecode_languaget::get_language_options(), and java_class_loader_limitt::setup_class_load_limit().
|
inline |
|
inlinestatic |
Definition at line 85 of file json.h.
References J_FALSE, J_TRUE, jsont(), and value.
Referenced by show_goto_functions_jsont::convert(), convert_assert(), convert_decl(), convert_default(), convert_input(), convert_output(), convert_return(), json(), and class_hierarchyt::output().
|
inline |
Definition at line 284 of file json.h.
Referenced by add_to_json(), convert_input(), convert_output(), json(), goto_inlinet::goto_inline_logt::output_inline_log_json(), goto_unwindt::unwind_logt::output_log_json(), show_loop_ids(), and bmct::show_vcc_json().
|
inline |
Definition at line 290 of file json.h.
References J_OBJECT, and kind.
Referenced by add_to_json(), show_goto_functions_jsont::convert(), convert(), convert_properties_json(), convert_return(), json(), json_output_function(), bmc_covert::operator()(), goto_inlinet::goto_inline_logt::output_inline_log_json(), dep_graph_domaint::output_json(), goto_unwindt::unwind_logt::output_log_json(), show_loop_ids_json(), bmct::show_vcc_json(), and static_verifier().
|
inline |
Definition at line 102 of file json.h.
References null_json_object.
|
inline |
Definition at line 78 of file json.h.
References output_rec().
Referenced by interpretert::command(), and operator<<().
|
static |
Definition at line 151 of file json.cpp.
References escape_string().
Referenced by json_stream_objectt::output_child_stream(), output_object(), json_stream_objectt::push_back_stream_array(), and json_stream_objectt::push_back_stream_object().
|
static |
Basic handling of the printing of a JSON object.
Dispatches to output_rec for most of the hard work.
out | The stream that the JSON object is to be printed to. |
object | The JSON object. |
indent | The indentation level. |
Definition at line 129 of file json.cpp.
References output_key().
Referenced by json_stream_objectt::output_finalizer(), and output_rec().
void jsont::output_rec | ( | std::ostream & | out, |
unsigned | indent | ||
) | const |
Recursive printing of the json object.
out | The stream object to have the json printed to. |
indent | The indentation level. |
Definition at line 56 of file json.cpp.
References array, escape_string(), J_ARRAY, J_FALSE, J_NULL, J_NUMBER, J_OBJECT, J_STRING, J_TRUE, kind, output_object(), and value.
Referenced by output(), and json_stream_arrayt::push_back().
void jsont::swap | ( | jsont & | other | ) |
Definition at line 158 of file json.cpp.
References array, kind, object, and value.
Referenced by parse_json(), and json_parsert::pop().
arrayt jsont::array |
Definition at line 129 of file json.h.
Referenced by json_arrayt::begin(), json_arrayt::cbegin(), json_arrayt::cend(), clear(), json_arrayt::emplace_back(), json_arrayt::end(), java_bytecode_languaget::get_language_options(), list_functions(), taint_analysist::operator()(), output_rec(), json_arrayt::push_back(), json_arrayt::resize(), java_class_loader_limitt::setup_class_load_limit(), json_arrayt::size(), static_unreachable_instructions(), swap(), taint_parser(), unreachable_instructions(), and yyjsonparse().
kindt jsont::kind |
Definition at line 37 of file json.h.
Referenced by clear(), is_array(), is_false(), is_null(), is_number(), is_object(), is_string(), is_true(), make_array(), make_object(), output_rec(), and swap().
|
static |
Definition at line 113 of file json.h.
Referenced by operator[](), json_stream_objectt::operator[](), and json_objectt::operator[]().
objectt jsont::object |
Definition at line 132 of file json.h.
Referenced by json_irept::convert_from_json(), swap(), and yyjsonparse().
std::string jsont::value |
Definition at line 137 of file json.h.
Referenced by clear(), java_bytecode_languaget::get_language_options(), json_boolean(), output_rec(), java_class_loader_limitt::setup_class_load_limit(), swap(), and yyjsonparse().