[#BloombergLP-bdljsn-JsonUtil-write-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonUtil.adoc[JsonUtil]::write
:relfileprefix: ../../../
:mrdocs:

Write a JSON text representation of `json` to `output`&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;jsonutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
write(
    std::pmr::string* output,
    xref:BloombergLP/bdljsn/Json.adoc[Json] const& json,
    xref:BloombergLP/bdljsn/WriteOptions.adoc[WriteOptions] const& options);
----

== Description

Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;

== Return Value

0 on success, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *output*
| string to receive the JSON text
| *json*
| document to serialize
| *options*
| options controlling JSON formatting
|===


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