BloombergLP::bdljsn::JsonUtil::write

Write a JSON text representation of json to output.

Synopsis

Declared in <bdljsn_jsonutil.h>

static
int
write(
    bsl::string* output,
    Json const& json,
    WriteOptions const& options);

Description

Return 0 on success and a non-zero value otherwise. See the documented write overload for full contract details.

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
outputstring to receive the JSON text
jsondocument to serialize
optionsoptions controlling JSON formatting