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.h>

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

Public Member Functions

void dropNullPlaceholders ()
 Drop the "null" string from the writer's output for nullValues. Strictly speaking, this is not valid JSON. But when the output is being fed to a browser's Javascript, it makes for smaller output and the browser can handle the output just fine. More...
 
void dropNullPlaceholders ()
 Drop the "null" string from the writer's output for nullValues. Strictly speaking, this is not valid JSON. But when the output is being fed to a browser's Javascript, it makes for smaller output and the browser can handle the output just fine. More...
 
void enableYAMLCompatibility ()
 
void enableYAMLCompatibility ()
 
 FastWriter ()
 
 FastWriter ()
 
void omitEndingLineFeed ()
 
void omitEndingLineFeed ()
 
std::string write (const Value &root) override
 
std::string write (const Value &root) override
 
 ~FastWriter () override
 
 ~FastWriter () override
 
- Public Member Functions inherited from Json::Writer
virtual ~Writer ()
 
virtual ~Writer ()
 

Private Member Functions

void writeValue (const Value &value)
 
void writeValue (const Value &value)
 

Private Attributes

std::string document_
 
bool dropNullPlaceholders_
 
bool omitEndingLineFeed_
 
bool yamlCompatiblityEnabled_
 

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 usefull to support feature such as RPC where bandwith is limited.

See also
Reader, Value
Deprecated:
Use StreamWriterBuilder.

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
Deprecated:
Use StreamWriterBuilder.

Definition at line 1823 of file third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h.

Constructor & Destructor Documentation

◆ FastWriter() [1/2]

Json::FastWriter::FastWriter ( )

◆ ~FastWriter() [1/2]

Json::FastWriter::~FastWriter ( )
inlineoverride

◆ FastWriter() [2/2]

Json::FastWriter::FastWriter ( )

◆ ~FastWriter() [2/2]

Json::FastWriter::~FastWriter ( )
inlineoverride

Member Function Documentation

◆ dropNullPlaceholders() [1/2]

void Json::FastWriter::dropNullPlaceholders ( )

Drop the "null" string from the writer's output for nullValues. Strictly speaking, this is not valid JSON. But when the output is being fed to a browser's Javascript, it makes for smaller output and the browser can handle the output just fine.

Definition at line 4292 of file bloaty/third_party/protobuf/conformance/third_party/jsoncpp/jsoncpp.cpp.

◆ dropNullPlaceholders() [2/2]

void Json::FastWriter::dropNullPlaceholders ( )

Drop the "null" string from the writer's output for nullValues. Strictly speaking, this is not valid JSON. But when the output is being fed to a browser's Javascript, it makes for smaller output and the browser can handle the output just fine.

◆ enableYAMLCompatibility() [1/2]

void Json::FastWriter::enableYAMLCompatibility ( )

◆ enableYAMLCompatibility() [2/2]

void Json::FastWriter::enableYAMLCompatibility ( )

◆ omitEndingLineFeed() [1/2]

void Json::FastWriter::omitEndingLineFeed ( )

◆ omitEndingLineFeed() [2/2]

void Json::FastWriter::omitEndingLineFeed ( )

◆ write() [1/2]

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

Implements Json::Writer.

◆ write() [2/2]

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

◆ writeValue() [1/2]

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

◆ writeValue() [2/2]

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

Member Data Documentation

◆ document_

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

◆ dropNullPlaceholders_

bool Json::FastWriter::dropNullPlaceholders_
private

◆ omitEndingLineFeed_

bool Json::FastWriter::omitEndingLineFeed_
private

◆ yamlCompatiblityEnabled_

bool Json::FastWriter::yamlCompatiblityEnabled_
private

The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:40