mirror of
https://github.com/nlohmann/json.git
synced 2024-07-07 12:23:49 +02:00
Added parse() for streams.
This commit is contained in:
parent
2855c70c27
commit
87746280ca
|
@ -1716,6 +1716,12 @@ class basic_json
|
||||||
return parser(s).parse();
|
return parser(s).parse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// deserialize from stream
|
||||||
|
static basic_json parse(std::istream& i)
|
||||||
|
{
|
||||||
|
return parser(i).parse();
|
||||||
|
}
|
||||||
|
|
||||||
/// deserialize from stream
|
/// deserialize from stream
|
||||||
friend std::istream& operator>>(std::istream& i, basic_json& j)
|
friend std::istream& operator>>(std::istream& i, basic_json& j)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue