rippled
Loading...
Searching...
No Matches
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...

#include <json_writer.h>

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 (Value const &root) override
 

Private Member Functions

void writeValue (Value const &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 bandwidth is limited.

See also
Reader, Value

Definition at line 34 of file json_writer.h.

Constructor & Destructor Documentation

◆ FastWriter()

Json::FastWriter::FastWriter ( )
default

◆ ~FastWriter()

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

Definition at line 38 of file json_writer.h.

Member Function Documentation

◆ write()

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

Implements Json::WriterBase.

Definition at line 181 of file json_writer.cpp.

◆ writeValue()

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

Definition at line 189 of file json_writer.cpp.

Member Data Documentation

◆ document_

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

Definition at line 50 of file json_writer.h.