43 {
44 typedef RAPIDJSON_NAMESPACE::Document
Document;
45 typedef RAPIDJSON_NAMESPACE::Reader
Reader;
48 typedef RAPIDJSON_NAMESPACE::Writer<StringBuffer> WriterType;
49
52 WriterType writer(buffer);
56
60
64
66 writer.Reset(buffer);
67 doc.Accept(writer);
70}
bool HasParseError() const
Whether a parse error has occurred in the last parsing.
GenericDocument & Parse(const typename SourceEncoding::Ch *str)
Parse JSON text from a read-only string (with Encoding conversion)
ParseResult Parse(InputStream &is, Handler &handler)
Parse JSON text.
const Ch * GetString() const
size_t GetSize() const
Get the size of string in bytes in the string buffer.
GenericDocument< UTF8<> > Document
GenericDocument with UTF8 encoding.
GenericStringStream< UTF8< char > > StringStream
GenericReader< UTF8< char >, UTF8< char >, CrtAllocator > Reader
GenericStringBuffer< UTF8< char >, CrtAllocator > StringBuffer
#define EXPECT_EQ(val1, val2)
#define EXPECT_TRUE(condition)
#define EXPECT_STREQ(s1, s2)