19#define RAPIDJSON_NAMESPACE my::rapid::json
20#define RAPIDJSON_NAMESPACE_BEGIN namespace my { namespace rapid { namespace json {
21#define RAPIDJSON_NAMESPACE_END } } }
32static const char json[] =
"{\"hello\":\"world\",\"t\":true,\"f\":false,\"n\":null,\"i\":123,\"pi\":3.1416,\"a\":[1,2,3,4]}";
43TEST(NamespaceTest,Direct) {
44 typedef RAPIDJSON_NAMESPACE::Document
Document;
45 typedef RAPIDJSON_NAMESPACE::Reader
Reader;
48 typedef RAPIDJSON_NAMESPACE::Writer<StringBuffer> WriterType;
52 WriterType writer(buffer);
C-runtime library allocator.
A document for parsing JSON text as DOM.
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)
#define TEST(test_case_name, test_name)
#define RAPIDJSON_NAMESPACE