BloombergLP::baljsn::Decoder::decodeAny

decodeAny overloads

Synopses

Declared in <baljsn_decoder.h>

Decode into the specified value without instantiating templates at compile time. Return 0 on success, and a non-zero value otherwise.

int
decodeAny(
    std::istream& stream,
    bdlar::AnyRef* value,
    DecoderOptions const& options);
» more...

Decode into the specified value without instantiating templates at compile time. Return 0 on success, and a non-zero value otherwise.

int
decodeAny(
    std::streambuf* streamBuf,
    bdlar::AnyRef* value,
    DecoderOptions const& options);
» more...

Decode JSON from stream into value using options without instantiating templates at compile time.

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

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

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

Decode JSON from streamBuf into value using options without instantiating templates at compile time.

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

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

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

Return Value

0 on success, and a non-zero value otherwise

Parameters

NameDescription
streaminput stream supplying JSON
valuetype-erased object to decode into
optionsdecoding options
streamBufinput buffer supplying JSON