#include "rapidjson/prettywriter.h"
#include <cstdio>
#include <string>
#include <vector>
Go to the source code of this file.
◆ main()
| int main |
( |
int |
, |
|
|
char * |
[] |
|
) |
| |
Definition at line 153 of file serialize.cpp.
154 std::vector<Employee> employees;
156 employees.push_back(
Employee(
"Milo YIP", 34,
true));
157 employees.back().AddDependent(
Dependent(
"Lua YIP", 3,
new Education(
"Happy Kindergarten", 3.5)));
158 employees.back().AddDependent(
Dependent(
"Mio YIP", 1));
160 employees.push_back(
Employee(
"Percy TSE", 30,
false));
166 for (std::vector<Employee>::const_iterator employeeItr = employees.begin(); employeeItr != employees.end(); ++employeeItr)
167 employeeItr->Serialize(writer);
Writer with indentation and spacing.
const Ch * GetString() const