read overloads

Synopses

Declared in <bdljsn_jsonutil.h>

Load to the specified result a value‐semantic representation of the JSON text in the specified input. Optionally specify an errorDescription that, if an error occurs, is loaded with a description of the error. Optionally specify options which allow altering the maximum nesting depth. Return 0 on success, and a non‐zero value if input does not consist of valid JSON text or an error occurs when reading from input. If options.allowTrailingText() is false (the default), then an error will be reported if a valid JSON text is followed by any text that does not consist solely of white‐space characters. If options.allowTrailingText() is true, then this function will return success where a valid JSON document is followed by additional text as long as that text is separated from the valid JSON by a delimiter character (i.e., either the JSON text ends in a delimiter, or the text that follows starts with a delimiter). Here, delimiters are white‐space characters, [],],{,},,, or ".

static
int
read(
    Json* result,
    std::istream& input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    std::string_view const& input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    std::streambuf* input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    std::istream& input,
    ReadOptions const& options);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    std::string_view const& input,
    ReadOptions const& options);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::istream& input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::string_view const& input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::streambuf* input);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    std::streambuf* input,
    ReadOptions const& options);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::istream& input,
    ReadOptions const& options);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::string_view const& input,
    ReadOptions const& options);

Load into result a value‐semantic representation of the JSON text in input. Return 0 on success and a non‐zero value otherwise. See the first read overload for full contract details.

static
int
read(
    Json* result,
    Error* errorDescription,
    std::streambuf* input,
    ReadOptions const& options);

Created with MrDocs