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);

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Write a JSON text representation of json to output.

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

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

output

stream to receive the JSON text

json

document to serialize

options

options controlling JSON formatting

Created with MrDocs