ADTF
|
JSON (JavaScript Object Notation). More...
Classes | |
class | SecureAllocator |
class | Features |
Configuration passed to reader and writer. More... | |
class | CharReader |
Interface for reading JSON from a char array. More... | |
class | CharReaderBuilder |
Build a CharReader implementation. More... | |
class | Exception |
Base class for all exceptions we throw. More... | |
class | RuntimeError |
Exceptions which the user cannot easily avoid. More... | |
class | LogicError |
Exceptions thrown by JSON_ASSERT/JSON_FAIL macros. More... | |
class | StaticString |
Lightweight wrapper to tag static string. More... | |
class | Value |
Represents a JSON value. More... | |
class | PathArgument |
Experimental and untested: represents an element of the "path" to access a node. More... | |
class | Path |
Experimental and untested: represents a "path" to access a node. More... | |
class | ValueIteratorBase |
base class for Value iterators. More... | |
class | ValueConstIterator |
const iterator for object and array value. More... | |
class | ValueIterator |
Iterator for object and array value. More... | |
class | StreamWriter |
Usage: More... | |
class | StreamWriterBuilder |
Build a StreamWriter implementation. More... | |
Typedefs | |
typedef int | Int |
typedef unsigned int | UInt |
typedef int64_t | Int64 |
typedef uint64_t | UInt64 |
typedef Int64 | LargestInt |
typedef UInt64 | LargestUInt |
typedef unsigned int | ArrayIndex |
Enumerations | |
enum | ValueType { nullValue = 0 , intValue , uintValue , realValue , stringValue , booleanValue , arrayValue , objectValue } |
Type of the value held by a Value object. More... | |
enum | CommentPlacement { commentBefore = 0 , commentAfterOnSameLine , commentAfter , numberOfCommentPlacement } |
Functions | |
template<typename T , typename U > | |
bool | operator== (const SecureAllocator< T > &, const SecureAllocator< U > &) |
template<typename T , typename U > | |
bool | operator!= (const SecureAllocator< T > &, const SecureAllocator< U > &) |
class | JSONCPP_DEPRECATED ("Use CharReader and CharReaderBuilder instead") JSON_API Reader |
Unserialize a JSON document into a Value. More... | |
bool JSON_API | parseFromStream (CharReader::Factory const &, JSONCPP_ISTREAM &, Value *root, std::string *errs) |
Consume entire stream and use its begin/end. More... | |
JSON_API JSONCPP_ISTREAM & | operator>> (JSONCPP_ISTREAM &, Value &) |
Read from 'sin' into 'root'. More... | |
JSONCPP_NORETURN void | throwRuntimeError (JSONCPP_STRING const &msg) |
used internally | |
JSONCPP_NORETURN void | throwLogicError (JSONCPP_STRING const &msg) |
used internally | |
JSONCPP_STRING JSON_API | writeString (StreamWriter::Factory const &factory, Value const &root) |
Write into stringstream, then return string, for convenience. More... | |
class | JSONCPP_DEPRECATED ("Use StreamWriter instead") JSON_API Writer |
Abstract class for writers. More... | |
class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API FastWriter class JSONCPP_DEPRECATED("Use StreamWriterBuilder instead") JSON_API StyledWriter class | JSONCPP_DEPRECATED ("Use StreamWriterBuilder instead") JSON_API StyledStreamWriter |
Outputs a Value in JSON format without formatting (not human friendly). More... | |
JSONCPP_STRING JSON_API | valueToString (Int value) |
JSONCPP_STRING JSON_API | valueToString (UInt value) |
JSONCPP_STRING JSON_API | valueToString (LargestInt value) |
JSONCPP_STRING JSON_API | valueToString (LargestUInt value) |
JSONCPP_STRING JSON_API | valueToString (double value) |
JSONCPP_STRING JSON_API | valueToString (bool value) |
JSONCPP_STRING JSON_API | valueToQuotedString (const char *value) |
JSON_API JSONCPP_OSTREAM & | operator<< (JSONCPP_OSTREAM &, const Value &root) |
Output using the StyledStreamWriter. More... | |
JSON (JavaScript Object Notation).
enum CommentPlacement |
enum ValueType |
Type of the value held by a Value object.
class Json::JSONCPP_DEPRECATED | ( | "Use CharReader and CharReaderBuilder instead" | ) |
Unserialize a JSON document into a Value.
Definition at line 1 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/3rdparty/json/reader.h.
class Json::JSONCPP_DEPRECATED | ( | "Use StreamWriter instead" | ) |
Abstract class for writers.
Definition at line 71 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/3rdparty/json/writer.h.
class JSONCPP_DEPRECATED ("Use StreamWriterBuilder instead") JSON_API FastWriter class JSONCPP_DEPRECATED ("Use StreamWriterBuilder instead") JSON_API StyledWriter class Json::JSONCPP_DEPRECATED | ( | "Use StreamWriterBuilder instead" | ) |
Outputs a Value in JSON format without formatting (not human friendly).
The JSON document is written in a single line. It is not intended for 'human' consumption, but may be usefull to support feature such as RPC where bandwith is limited.
Writes a Value in JSON format in a human friendly way.
The rules for line break and indent are as follow:
If the Value have comments then they are outputed according to their CommentPlacement.
Writes a Value in JSON format in a human friendly way, to a stream rather than to a string.
The rules for line break and indent are as follow:
If the Value have comments then they are outputed according to their CommentPlacement.
Definition at line 71 of file workspace/conan/dev_essential/1.5.0/dw/stable/package/aef85909f792a5a628750d25016a24323084963f/include/3rdparty/json/writer.h.
JSON_API JSONCPP_OSTREAM& Json::operator<< | ( | JSONCPP_OSTREAM & | , |
const Value & | root | ||
) |
Output using the StyledStreamWriter.
JSON_API JSONCPP_ISTREAM& Json::operator>> | ( | JSONCPP_ISTREAM & | , |
Value & | |||
) |
Read from 'sin' into 'root'.
Always keep comments from the input JSON.
This can be used to read a file into a particular sub-object. For example:
Result:
{ "dir": { "file": { // The input stream JSON would be nested here. } } }
std::exception | on parse error. |
bool JSON_API Json::parseFromStream | ( | CharReader::Factory const & | , |
JSONCPP_ISTREAM & | , | ||
Value * | root, | ||
std::string * | errs | ||
) |
Consume entire stream and use its begin/end.
Someday we might have a real StreamReader, but for now this is convenient.
JSONCPP_STRING JSON_API Json::writeString | ( | StreamWriter::Factory const & | factory, |
Value const & | root | ||
) |
Write into stringstream, then return string, for convenience.
A StreamWriter will be created from the factory, used, and then deleted.