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

Decode JSON from streamBuf into value using default options.

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

Decode JSON from stream into value using options.

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

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

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

Decode JSON from streamBuf into value using options.

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

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

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

Return Value

0 on success, and a non‐zero value otherwise

Parameters

Name

Description

stream

input stream supplying JSON

value

object to decode into

streamBuf

input buffer supplying JSON

options

decoding options

Created with MrDocs