rippled
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Json::FastWriter Class Reference

Outputs a Value in JSON format without formatting (not human friendly). More...

Inheritance diagram for Json::FastWriter:
Inheritance graph
[legend]
Collaboration diagram for Json::FastWriter:
Collaboration graph
[legend]

Public Member Functions

 FastWriter ()=default
 
virtual ~FastWriter ()
 
std::string write (const Value &root) override
 

Private Member Functions

void writeValue (const Value &value)
 

Private Attributes

std::string document_
 

Detailed Description

Outputs a Value in JSON format without formatting (not human friendly).

The JSON document is written in a single line. It is not intended for 'human' consumption, but may be useful to support feature such as RPC where bandwith is limited.

See also
Reader, Value

Definition at line 52 of file json_writer.h.

Constructor & Destructor Documentation

◆ FastWriter()

Json::FastWriter::FastWriter ( )
default

◆ ~FastWriter()

virtual Json::FastWriter::~FastWriter ( )
virtual

Definition at line 56 of file json_writer.h.

Member Function Documentation

◆ write()

std::string Json::FastWriter::write ( const Value root)
overridevirtual

Implements Json::WriterBase.

Definition at line 193 of file json_writer.cpp.

◆ writeValue()

void Json::FastWriter::writeValue ( const Value value)
private

Definition at line 201 of file json_writer.cpp.

Member Data Documentation

◆ document_

std::string Json::FastWriter::document_
private

Definition at line 68 of file json_writer.h.