26#define DOCUMENT reinterpret_cast<Document*>(mDocument)
27#define STACK (reinterpret_cast<JsonReaderStack*>(mStack))
28#define TOP (STACK->top())
29#define CURRENT (*TOP.value)
37 mStack = new JsonReaderStack;
38 STACK->push(JsonReaderStackItem(DOCUMENT, JsonReaderStackItem::BeforeStart));
72 if (memberItr !=
CURRENT.MemberEnd())
185void JsonReader::Next() {
187 assert(!
STACK->empty());
213#define WRITER reinterpret_cast<PrettyWriter<StringBuffer>*>(mWriter)
214#define STREAM reinterpret_cast<StringBuffer*>(mStream)
227 return STREAM->GetString();
std::stack< JsonReaderStackItem > JsonReaderStack
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
(Constant) member iterator for a JSON object value
Represents a JSON reader which implements Archiver concept.
bool HasMember(const char *name) const
JsonReader & StartArray(size_t *size=0)
JsonReader(const char *json)
Constructor.
JsonReader & operator&(bool &b)
JsonReader & Member(const char *name)
JsonReader & StartObject()
JsonWriter & operator&(bool &b)
JsonWriter & Member(const char *name)
const char * GetString() const
Obtains the serialized JSON string.
JsonWriter & StartArray(size_t *size=0)
JsonWriter & StartObject()
bool HasMember(const char *name) const
Writer with indentation and spacing.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
RAPIDJSON_NAMESPACE_BEGIN typedef unsigned SizeType
Size type (for string lengths, array sizes, etc.)
JsonReaderStackItem(const Value *value, State state)
@ BeforeStart
An object/array is in the stack but it is not yet called by StartObject()/StartArray().
@ Closed
An array is closed after read all element, but before EndArray().
@ Started
An object/array is called by StartObject()/StartArray().