Return whether this formatter is currently formatting an object.

Synopsis

Declared in <baljsn_simpleformatter.h>

bool
isFormattingObject() const;

Description

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

Return Value

true if currently formatting an object, and false otherwise

Created with MrDocs