rapidjson::Writer
Engine/source/persistence/rapidjson/writer.h
JSON writer.
Classes:
class
Information for each nested level.
Public Types
SourceEncoding::Ch
Ch
Protected Static Attributes
const size_t
Protected Attributes
OutputStream &
Protected Functions
WriteDouble(double d)
WriteInt64(int64_t i64)
WriteString(const Ch * str, SizeType length)
WriteUint64(uint64_t u64)
Detailed Description
JSON writer.
Writer implements the concept Handler. It generates JSON text by events to an output os.
User may programmatically calls the functions of a writer to generate JSON text.
On the other side, a writer can also be passed to objects that generates events,
for example Reader::Parse() and Document::Accept().
Parameters:
| OutputStream | Type of output stream. |
| SourceEncoding | Encoding of both source strings. |
| TargetEncoding | Encoding of and output stream. |
Public Types
typedef SourceEncoding::Ch Ch
Protected Static Attributes
const size_t kDefaultLevelDepth
Protected Attributes
internal::Stack< Allocator > level_stack_
OutputStream & os_
Public Functions
Writer(OutputStream & os, Allocator * allocator, size_t levelDepth)
Bool(bool b)
Double(double d)
EndArray(SizeType elementCount)
EndObject(SizeType memberCount)
Int(int i)
Int64(int64_t i64)
Null()
StartArray()
StartObject()
String(const Ch * str)
Simpler but slower overload.
String(const Ch * str, SizeType length, bool copy)
Uint(unsigned u)
Uint64(uint64_t u64)
Protected Functions
Prefix(Type type)
WriteBool(bool b)
WriteDouble(double d)
Todo: Optimization with custom double-to-string converter.
WriteEndArray()
WriteEndObject()
WriteInt(int i)
WriteInt64(int64_t i64)
WriteNull()
WriteStartArray()
WriteStartObject()
WriteString(const Ch * str, SizeType length)
WriteUint(unsigned u)
WriteUint64(uint64_t u64)
