|
Honeycomb
0.1
Component-Model Framework
|
Json string serialization format methods. More...
Classes | |
| struct | Config |
| Configuration for json value variant. More... | |
| struct | null_t |
| Json null value type. More... | |
| class | Value_ |
| Json value variant. Provide a Config to customize the variant's bounded types. More... | |
| struct | ValueError |
Typedefs | |
| typedef Value_< Config<> > | Value |
| Json value with default config. More... | |
Enumerations | |
| enum | ValueType { ValueType::Null, ValueType::Int, ValueType::Real, ValueType::Bool, ValueType::String, ValueType::Array, ValueType::Object } |
| Json value type, corresponds to Value::Variant bounded type id. More... | |
Functions | |
| template<class Config > | |
| istream & | operator>> (istream &is, Value_< Config > &val) |
Convert a string to a json value tree. Returns either a tree with val as the root array/object, or null if string is empty. More... | |
| template istream & | operator>> (istream &is, Value_< Config< true >> &val) |
| template istream & | operator>> (istream &is, Value_< Config< false >> &val) |
| template<class Config > | |
| ostream & | operator<< (ostream &os, const Value_< Config > &val) |
| Convert a json value tree to a string. Throws ValueError on write failure. More... | |
| template ostream & | operator<< (ostream &os, const Value_< Config< true >> &val) |
| template ostream & | operator<< (ostream &os, const Value_< Config< false >> &val) |
| ostream & | beautify (ostream &os) |
| Output easily readable json with line breaks and indentation. More... | |
| ostream & | escapeSlash (ostream &os) |
| Escape forward slash characters in json output so it is suitable for embedding in HTML. More... | |
Variables | |
| static null_t | null |
| Json null value. More... | |
Json string serialization format methods.
| typedef Value_<Config<> > honey::json::Value |
Json value with default config.
|
strong |
Json value type, corresponds to Value::Variant bounded type id.
| Enumerator | |
|---|---|
| Null | |
| Int | |
| Real | |
| Bool | |
| String | |
| Array | |
| Object | |
|
inline |
Output easily readable json with line breaks and indentation.
|
inline |
Escape forward slash characters in json output so it is suitable for embedding in HTML.
| ostream & honey::json::operator<< | ( | ostream & | os, |
| const Value_< Config > & | val | ||
| ) |
Convert a json value tree to a string. Throws ValueError on write failure.
Convert a string to a json value tree. Returns either a tree with val as the root array/object, or null if string is empty.
All whitespace before the root json value (if any) is consumed. After parsing the stream position will be just after the root json array end ']' or object end '}'. Throws ValueError on parse failure.
|
static |
Json null value.
1.8.10