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);

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);

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);

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

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

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);

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

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

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

stream

input stream supplying JSON

value

type‐erased object to decode into

options

decoding options

streamBuf

input buffer supplying JSON

Created with MrDocs