Function
explicit basic_json(std::istream& i, const parser_callback_t cb = nullptr)
has been deprecated since version 2.0.0 (June 24, 2016) to unify the interface of the library. Deprecation warnings were produced with GCC, Clang, and MSVC.
To create objects from an input stream, there remain the following possibilities:
- with callback:
parse(std::istream& i, const parser_callback_t cb = nullptr)
- without callback
std::istream& operator<<(basic_json& j, std::istream& i)
std::istream& operator>>(std::istream& i, basic_json& j)
That is, code without callback cb
must be replaced by either
// alternative 1
json j = json::parse(i);
// alternative 2
json j;
j << i;
// alternative 3
json j;
i >> j;
Code with a callback function cb
must be replaced by
json j = json::parse(i, cb);
Function
has been deprecated since version 2.0.0 (June 24, 2016) to unify the interface of the library. Deprecation warnings were produced with GCC, Clang, and MSVC.
To create objects from an input stream, there remain the following possibilities:
parse(std::istream& i, const parser_callback_t cb = nullptr)std::istream& operator<<(basic_json& j, std::istream& i)std::istream& operator>>(std::istream& i, basic_json& j)That is, code without callback
cbjson j(i);must be replaced by either
Code with a callback function
cbjson j(i, cb);must be replaced by