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

`write` overloads

== Synopses

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

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
xref:BloombergLP/bdljsn/JsonUtil/write-0dc.adoc[write](
    std::ostream& output,
    xref:BloombergLP/bdljsn/Json.adoc[Json] const& json);
----

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0dc.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0e.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-00.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0d7.adoc[_» more&period;&period;&period;_]#

Write to the specified `output` a JSON text representation of the specified `json` document, using the optionally specified `options` for formatting the resulting text&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Note that this operation will report an error only if there is an error writing to `output`&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-04.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0b.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0c4.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-0f.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-09.adoc[_» more&period;&period;&period;_]#

Write to `output` a JSON text representation of `json`&period; Return 0 on success and a non&hyphen;zero value otherwise&period; See the documented `write` overload for full contract details&period;


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

[.small]#xref:BloombergLP/bdljsn/JsonUtil/write-01.adoc[_» more&period;&period;&period;_]#


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