Automatically allocate memory as needed in parse

This commit is contained in:
John Keiser
2020-03-06 15:40:59 -08:00
parent 00f0859e1f
commit d140bc23f5
18 changed files with 317 additions and 202 deletions
-1
View File
@@ -7,7 +7,6 @@ int main() {
std::string json =
"{\"/~01abc\": [0, {\"\\\\\\\" 0\": [\"value0\", \"value1\"]}]}";
simdjson::ParsedJson pj;
assert(pj.allocate_capacity(json.length()));
simdjson::json_parse(json.c_str(), json.length(), pj);
assert(pj.is_valid());
simdjson::ParsedJson::Iterator it(pj);