BloombergLP::baljsn::DatumUtil::encode

Encode datum as JSON into result as a std::string.

Synopsis

Declared in <baljsn_datumutil.h>

static
int
encode(
    std::string* result,
    bdld::Datum const& datum);

Description

Same as the preceding overload, loading into a std::string.

Return Value

0 on success, a negative value on failure, or a positive value if strictTypes is enabled and an unsupported type is encoded

Parameters

NameDescription
resultreceives the encoded JSON string
datumDatum to encode