[#BloombergLP-baljsn-JsonFormatter-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/JsonFormatter.adoc[JsonFormatter]::JsonFormatter
:relfileprefix: ../../../
:mrdocs:

Create a `JsonFormatter` that modifies the specified `json` object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
JsonFormatter(
    xref:BloombergLP/bdljsn/Json.adoc[bdljsn::Json]* json,
    xref:BloombergLP/baljsn/JsonFormatter/allocator_type.adoc[allocator&lowbar;type] const& allocator = allocator&lowbar;type());
----

== Description

Create a `JsonFormatter` object that modifies the specified `json` object in accordance with subsequent calls the formatter manipulators&period; Optionally specify an `allocator` (e&period;g&period;, the address of a `bslma&colon;&colon;Allocator` object) to supply memory&semi; otherwise, the default allocator is used&period; The behavior is undefined unless `json&hyphen;&gt;isNull()`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *json*
| null `bdljsn&colon;&colon;Json` object to assemble
| *allocator*
| memory allocator&semi; default uses the default allocator
|===


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