webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Member Functions | List of all members
Json::FastWriter Class Reference

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

#include <writer.h>

Inheritance diagram for Json::FastWriter:
Json::Writer Json::Writer

Public Member Functions

 FastWriter ()
 
virtual ~FastWriter ()
 
void enableYAMLCompatibility ()
 
virtual std::string write (const Value &root)
 
 FastWriter ()
 
 ~FastWriter () override
 
void enableYAMLCompatibility ()
 
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 omitEndingLineFeed ()
 
std::string write (const Value &root) override
 
- Public Member Functions inherited from Json::Writer
virtual ~Writer ()
 
virtual ~Writer ()
 

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

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.

Constructor & Destructor Documentation

◆ FastWriter() [1/2]

Json::FastWriter::FastWriter ( )

◆ ~FastWriter() [1/2]

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

◆ FastWriter() [2/2]

Json::FastWriter::FastWriter ( )

◆ ~FastWriter() [2/2]

Json::FastWriter::~FastWriter ( )
inlineoverride

Member Function Documentation

◆ dropNullPlaceholders()

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()

void Json::FastWriter::omitEndingLineFeed ( )

◆ write() [1/2]

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

Implements Json::Writer.

◆ write() [2/2]

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

Implements Json::Writer.


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