BloombergLP::baljsn::Encoder_Formatter

This class implements a formatter for rendering JSON text elements.

Synopsis

Declared in <baljsn_encoder.h>

class Encoder_Formatter;

Description

This class provides operations for rending JSON text elements to an output stream (supplied at construction) according to a set of formatting options (also supplied at construction). This is a component-private class and should not be used outside of this component.

DEPRECATED: Use baljsn::Formatter instead.

Member Functions

NameDescription
Encoder_Formatter [constructor]Create a Encoder_Formatter object using the specified stream and options.
closeArray Print the end-of-array designator onto the construction stream.
closeDocument Print onto the stream supplied at construction the sequence of characters designating the end of the document.
closeElement Print onto the stream supplied at construction the sequence of characters designating the end of an element.
closeObject Print onto the stream supplied at construction the sequence of characters designating the end of an object.
indent Print indentation whitespace onto the construction stream.
isArrayElement Return the value of the flag denoting if the current element refers to an array element.
openArray Print the start-of-array designator onto the construction stream.
openDocument Print onto the stream supplied at construction the sequence of characters designating the start of the document.
openElement Print the start-of-element designator for name onto the stream.
openObject Print onto the stream supplied at construction the sequence of characters designating the start of an object.
setIsArrayElement Set the flag denoting if the current element refers to an array element to the specified isArrayElement.