Closed Dushistov closed 8 years ago
Cool, thanks! A few requests:
size_t orig_size = json_str.size();
json_str += R"({"k2":"v2", "k3":[)";
res = Json::parse_multi(json_str, parser_stop_pos, err);
assert(parser_stop_pos == orig_size);
assert(res.size() >= 1);
I updated branch parse_not_full_json
, so pull request was changed.
Changes:
R"({"k2":"v2", "k3":[)"
I subscribed "Dropbox Contributor License Agreement".
This patch (pull request) add ability to parse half ready json. For example if you recieve json stream from network, you can get something like this
you get one full json entry, and half of next one.
At now
json11
can parse{"k1" : "v1"}
and give up on{"k2":
- great. Butjson11
not return updated position in input, so it is not possible to remove{"k1" : "v1"}
from internal buffer and wait for new data. This pull request solve this inconvenience.