[#BloombergLP-bdljsn-JsonUtil-write-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/JsonUtil.adoc[JsonUtil]::write :relfileprefix: ../../../ :mrdocs: 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`. == Synopsis Declared in `<bdljsn_jsonutil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int write( std::string* output, xref:BloombergLP/bdljsn/Json.adoc[Json] const& json); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#