nlohmann::basic_json::from_ubjson

create a JSON value from an input in UBJSON format

Synopsis

Declared in <nlohmann/json.hpp>

template<typename InputType>
[[nodiscard]]
static
basic_json
from_ubjson(
    InputType&& i,
    bool const strict = true,
    bool const allow_exceptions = true);

Return Value

a JSON value representing the input, or a discarded value if allow_exceptions is false and a parse error occurred

NOTE

The return value should not be discarded.

Parameters

NameDescription
ian input in UBJSON format convertible to an input adapter
strictwhether to expect the input to be consumed until EOF
allow_exceptionswhether to throw exceptions in case of a parse error