#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <iostream>
Go to the source code of this file.
◆ main()
Definition at line 8 of file simplewriter.cpp.
8 {
11
12 writer.StartObject();
13 writer.Key("hello");
14 writer.String("world");
15 writer.Key("t");
16 writer.Bool(true);
17 writer.Key("f");
18 writer.Bool(false);
19 writer.Key("n");
20 writer.Null();
21 writer.Key("i");
22 writer.Uint(123);
23 writer.Key("pi");
24 writer.Double(3.1416);
25 writer.Key("a");
26 writer.StartArray();
27 for (unsigned i = 0; i < 4; i++)
28 writer.Uint(i);
29 writer.EndArray();
30 writer.EndObject();
31
32
33 cout <<
s.GetString() << endl;
34
35 return 0;
36}