[#BloombergLP-bdljsn-JsonUtil-write-0c6] = 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`. == Synopses Declared in `<bdljsn_jsonutil.h>` Write a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` 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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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 a JSON text representation of `json` to `output`. [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..._]# == Return Value 0 on success, and a non‐zero value otherwise == Parameters [cols="1,4"] |=== | Name| Description | *output* | stream to receive the JSON text | *json* | document to serialize | *options* | options controlling JSON formatting |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#