decode overloads

Synopses

Declared in <baljsn_datumutil.h>

Decode the specified json into the specified result. If the optionally specified errorStream is non‐null, a description of any errors that occur during parsing will be output to this stream. If the optionally specified options argument is not present, treat it as a default‐constructed DatumDecoderOptions. Return 0 on success, and a negative value if json could not be decoded (either because it is ill‐formed, or if a constraint imposed by option is violated). An error status will be returned if json contains arrays or objects that are nested beyond a depth configured by options.maxNestedDepth(). The mapping of types in JSON to the types supported by Datum is described in []Types).

static
int
decode(
    bdld::ManagedDatum* result,
    std::string_view const& json);

Decode the JSON string provided by the specified jsonBuffer into the specified result. If the optionally specified errorStream is non‐null, a description of any errors that occur during parsing will be output to this stream. If the optionally specified options argument is not present, treat it as a default‐constructed DatumDecoderOptions. Return 0 on success, and a negative value if json could not be decoded (either because it is ill‐formed, or if a constraint imposed by option is violated). An error status will be returned if json contains arrays or objects that are nested beyond a depth configured by options.maxNestedDepth(). The mapping of types in JSON to the types supported by Datum is described in []Types).

static
int
decode(
    bdld::ManagedDatum* result,
    std::streambuf* jsonBuffer);

Same as the preceding overload, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::string_view const& json,
    DatumDecoderOptions const& options);

Same as the preceding overload, writing errors to errorStream.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::string_view const& json);

Same as the preceding overload, writing errors to errorStream.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::streambuf* jsonBuffer);

Same as the preceding overload, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::streambuf* jsonBuffer,
    DatumDecoderOptions const& options);

Same as the preceding overload, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::string_view const& json,
    DatumDecoderOptions const& options);

Same as the preceding overload, using the specified options.

static
int
decode(
    bdld::ManagedDatum* result,
    std::ostream* errorStream,
    std::streambuf* jsonBuffer,
    DatumDecoderOptions const& options);

Created with MrDocs