MCPcopy Create free account
hub / github.com/Tencent/rapidjson / Serialize

Method Serialize

example/serialize/serialize.cpp:25–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23protected:
24 template <typename Writer>
25 void Serialize(Writer& writer) const {
26 // This base class just write out name-value pairs, without wrapping within an object.
27 writer.String("name");
28#if RAPIDJSON_HAS_STDSTRING
29 writer.String(name_);
30#else
31 writer.String(name_.c_str(), static_cast<SizeType>(name_.length())); // Supplying length of string is faster.
32#endif
33 writer.String("age");
34 writer.Uint(age_);
35 }
36
37private:
38 std::string name_;

Callers 3

SerializeMethod · 0.45
SerializeMethod · 0.45
mainFunction · 0.45

Calls 2

StringMethod · 0.45
UintMethod · 0.45

Tested by

no test coverage detected