BloombergLP::bdljsn::JsonUtil::write

Write a JSON text representation of json to output.

Synopses

Declared in <bdljsn_jsonutil.h>

Write a JSON text representation of json to output.

static
int
write(
    std::ostream& output,
    Json const& json);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::streambuf* output,
    Json const& json);
» more...

Write a JSON text representation of json to output.

static
int
write(
    bsl::string* output,
    Json const& json);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::pmr::string* output,
    Json const& json);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::string* output,
    Json const& json);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::ostream& output,
    Json const& json,
    WriteOptions const& options);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::streambuf* output,
    Json const& json,
    WriteOptions const& options);
» more...

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

static
int
write(
    std::pmr::string* output,
    Json const& json,
    WriteOptions const& options);
» more...

Write a JSON text representation of json to output.

static
int
write(
    std::string* output,
    Json const& json,
    WriteOptions const& options);
» more...

Return Value

0 on success, and a non-zero value otherwise

Parameters

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