[#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 `<bdljsn_jsonutil.h>` Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to the specified `output` a JSON text representation of the specified `json` document, using the optionally specified `options` for formatting the resulting text. Return 0 on success, and a non‐zero value otherwise. Note that this operation will report an error only if there is an error writing to `output`. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# Write to `output` a JSON text representation of `json`. Return 0 on success and a non‐zero value otherwise. See the documented `write` overload for full contract details. [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..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#