From 87746280cafe739107376861f3feafc600289281 Mon Sep 17 00:00:00 2001 From: Aaron Burghardt Date: Sun, 1 Mar 2015 06:21:47 -0500 Subject: [PATCH] Added parse() for streams. --- src/json.hpp.re2c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index b328880b..7f7c098c 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -1716,6 +1716,12 @@ class basic_json return parser(s).parse(); } + /// deserialize from stream + static basic_json parse(std::istream& i) + { + return parser(i).parse(); + } + /// deserialize from stream friend std::istream& operator>>(std::istream& i, basic_json& j) {