[#BloombergLP-baljsn-Encoder_Formatter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::Encoder&lowbar;Formatter
:relfileprefix: ../../
:mrdocs:

This class implements a formatter providing operations for rending JSON text elements to an output stream (supplied at construction) according to a set of formatting options (also supplied at construction)&period; This is a component&hyphen;private class and should not be used outside of this component&period;

== Synopsis

Declared in `&lt;baljsn&lowbar;encoder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Encoder&lowbar;Formatter;
----

== Description

DEPRECATED&colon; Use `baljsn&colon;&colon;Formatter` instead&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/baljsn/Encoder_Formatter/2constructor.adoc[`Encoder&lowbar;Formatter`]         [.small]#[constructor]#
| Create a `Encoder&lowbar;Formatter` object using the specified `stream` and `options`&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/closeArray.adoc[`closeArray`] 
| Print onto the stream supplied at construction the sequence of characters designating the end of an array&period; Optionally specify `formatAsEmptyArrayFlag` denoting if the array being closed should be formatted as an empty array&period; If `formatAsEmptyArrayFlag` is not specified then the array being closed is formatted as an array having elements&period; Note that the formatting (and as a consequence the `formatAsEmptyArrayFlag`) is relevant only if this formatter encodes in the pretty style and is ignored otherwise&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/closeDocument.adoc[`closeDocument`] 
| Print onto the stream supplied at construction the sequence of characters designating the end of the document&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/closeElement.adoc[`closeElement`] 
| Print onto the stream supplied at construction the sequence of characters designating the end of an element&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/closeObject.adoc[`closeObject`] 
| Print onto the stream supplied at construction the sequence of characters designating the end of an object&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/indent.adoc[`indent`] 
| Print onto the stream supplied at construction the sequence of whitespace characters for the proper indentation of an element given the encoding options supplied at construction&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/isArrayElement.adoc[`isArrayElement`] 
| Return the value of the flag denoting if the current element refers to an array element&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/openArray.adoc[`openArray`] 
| Print onto the stream supplied at construction the sequence of characters designating the start of an array&period; Optionally specify `formatAsEmptyArrayFlag` denoting if the array being opened should be formatted as an empty array&period; If `formatAsEmptyArrayFlag` is not specified then the array being opened is formatted as an array having elements&period; Note that the formatting (and as a consequence the `formatAsEmptyArrayFlag`) is relevant only if this formatter encodes in the pretty style and is ignored otherwise&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/openDocument.adoc[`openDocument`] 
| Print onto the stream supplied at construction the sequence of characters designating the start of the document&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/openElement.adoc[`openElement`] 
| Print onto the stream supplied at construction the sequence of characters designating the start of an element having the specified `name`&period; Return 0 on success and a non&hyphen;zero value otherwise&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/openObject.adoc[`openObject`] 
| Print onto the stream supplied at construction the sequence of characters designating the start of an object&period;
| xref:BloombergLP/baljsn/Encoder_Formatter/setIsArrayElement.adoc[`setIsArrayElement`] 
| Set the flag denoting if the current element refers to an array element to the specified `isArrayElement`&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
