BloombergLP::baljsn::Decoder::decode

decode overloads

Synopses

Declared in <baljsn_decoder.h>

Decode JSON from stream into value using default options.

template<class TYPE>
int
decode(
    std::istream& stream,
    TYPE* value);
» more...

Decode JSON from streamBuf into value using default options.

template<class TYPE>
int
decode(
    std::streambuf* streamBuf,
    TYPE* value);
» more...

Decode JSON from stream into value using options.

template<class TYPE>
int
decode(
    std::istream& stream,
    TYPE* value,
    DecoderOptions const& options);
» more...

Same as the preceding overload, accepting a nullable options pointer.

template<class TYPE>
int
decode(
    std::istream& stream,
    TYPE* value,
    DecoderOptions const* options);
» more...

Decode JSON from streamBuf into value using options.

template<class TYPE>
int
decode(
    std::streambuf* streamBuf,
    TYPE* value,
    DecoderOptions const& options);
» more...

Same as the preceding overload, accepting a nullable options pointer.

template<class TYPE>
int
decode(
    std::streambuf* streamBuf,
    TYPE* value,
    DecoderOptions const* options);
» more...

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streaminput stream supplying JSON
valueobject to decode into
streamBufinput buffer supplying JSON
optionsdecoding options