[#BloombergLP-baljsn-SimpleFormatter-isFormattingObject]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/SimpleFormatter.adoc[SimpleFormatter]::isFormattingObject
:relfileprefix: ../../../
:mrdocs:

Return whether this formatter is currently formatting an object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
isFormattingObject() const;
----

== Description

Return `true` if this `SimpleFormatter` is currently formatting an object scope and `false` otherwise&period; It is formatting an object scope if the last `open&ast;` method overload (`openArray` or `openObject`) called on this `SimpleFormatter` for which the corresponding `close&ast;` method (respectively, `closeArray` or `closeObject`) was `openObject`&period; If `isFormattingObject()` is `true`, then `isFormattingArray()` is `false`&period; Note that both can be `false`, at the `top&hyphen;level` initial scope before anything is added&sol;opened or after the first `open&ast;` call has been closed&apos; JSON&period;

== Return Value

`true` if currently formatting an object, and `false` otherwise


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