|
CppCMS
|
This namespace includes all JSON parsing and formatting related classes and functions. More...
Classes | |
| class | bad_value_cast |
| The error that is thrown in case of bad conversion of json::value to ordinary value. More... | |
| struct | null |
| Special object that is convertible to null json value. More... | |
| struct | traits |
| The type traits schema for converting json values to/from orinary objects i.e. serialization from JSON to C++ object. More... | |
| struct | undefined |
| Special object that is convertible to undefined json value. More... | |
| class | value |
| This class is central representation of json objects. More... | |
Typedefs | |
| typedef std::vector< value > | array |
| The json::array - std::vector of json::value's. | |
| typedef std::map< string_key, value > | object |
| The json::object - std::map of json::value's. | |
Enumerations | |
| enum | json_type { is_undefined, is_null, is_boolean, is_number, is_string, is_object, is_array } |
| enum | { compact = 0, readable = 1 } |
Functions | |
| bool | operator== (undefined const &, undefined const &) |
| bool | operator!= (undefined const &, undefined const &) |
| bool | operator== (null const &, null const &) |
| bool | operator!= (null const &, null const &) |
| std::istream CPPCMS_API & | operator>> (std::istream &in, value &v) |
| std::ostream CPPCMS_API & | operator<< (std::ostream &out, value const &v) |
| std::ostream CPPCMS_API & | operator<< (std::ostream &out, json_type) |
| std::string CPPCMS_API | to_json (std::string const &utf) |
| std::string CPPCMS_API | to_json (char const *begin, char const *end) |
| void CPPCMS_API | to_json (char const *begin, char const *end, std::ostream &out) |
| void CPPCMS_API | to_json (std::string const &str, std::ostream &out) |
This namespace includes all JSON parsing and formatting related classes and functions.
| anonymous enum |
| std::ostream CPPCMS_API& cppcms::json::operator<< | ( | std::ostream & | out, |
| value const & | v | ||
| ) |
Write json object to output stream
| std::ostream CPPCMS_API& cppcms::json::operator<< | ( | std::ostream & | out, |
| json_type | |||
| ) |
Write human readable representation of json_type
| std::istream CPPCMS_API& cppcms::json::operator>> | ( | std::istream & | in, |
| value & | v | ||
| ) |
Read json object from input stream
| std::string CPPCMS_API cppcms::json::to_json | ( | std::string const & | utf | ) |
Convert UTF-8 string to JSON string, i.e. a sring foo is converted to "foo", a string bar"baz is converted to "bar"baz"
Referenced by cppcms::json::value::swap().
| std::string CPPCMS_API cppcms::json::to_json | ( | char const * | begin, |
| char const * | end | ||
| ) |
Convert UTF-8 string to JSON string, i.e. a sring foo is converted to "foo", a string bar"baz is converted to "bar"baz"
| void CPPCMS_API cppcms::json::to_json | ( | char const * | begin, |
| char const * | end, | ||
| std::ostream & | out | ||
| ) |
Convert UTF-8 string to JSON string, i.e. a sring foo is converted to "foo", a string bar"baz is converted to "bar"baz"
| void CPPCMS_API cppcms::json::to_json | ( | std::string const & | str, |
| std::ostream & | out | ||
| ) |
Convert UTF-8 string to JSON string, i.e. a sring foo is converted to "foo", a string bar"baz is converted to "bar"baz"
1.8.11