BloombergLP::baljsn::DatumUtil::decode

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

Synopsis

Declared in <baljsn_datumutil.h>

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

Description

Same as the preceding overload, writing errors to errorStream.

Return Value

0 on success, and a negative value otherwise

Parameters

NameDescription
resultreceives the decoded Datum
errorStreamoptional stream for parse-error descriptions
jsonBufferstream buffer providing JSON text