BloombergLP::baljsn::DatumUtil::decode

decode overloads

Synopses

Declared in <baljsn_datumutil.h>

Decode the specified json into the specified result.

static
int
decode(
    bdld::ManagedDatum* result,
    std::string_view const& json);
» more...

Decode JSON from the specified jsonBuffer into the specified result.

static
int
decode(
    bdld::ManagedDatum* result,
    std::streambuf* jsonBuffer);
» more...

Decode json into result, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::string_view const& json,
    DatumDecoderOptions const& options);
» more...

Decode json into result, writing errors to errorStream.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::string_view const& json);
» more...

Decode JSON from jsonBuffer into result, writing errors to errorStream.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::streambuf* jsonBuffer);
» more...

Decode JSON from jsonBuffer into result, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::streambuf* jsonBuffer,
    DatumDecoderOptions const& options);
» more...

Decode json into result, writing errors to errorStream, using options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::string_view const& json,
    DatumDecoderOptions const& options);
» more...

Decode JSON from jsonBuffer into result, writing errors to errorStream, using options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::streambuf* jsonBuffer,
    DatumDecoderOptions const& options);
» more...

Return Value

0 on success, and a negative value otherwise

Parameters

NameDescription
resultreceives the decoded Datum
jsonJSON text to decode
jsonBufferstream buffer providing JSON text
optionsdecoding options
errorStreamoptional stream for parse-error descriptions