48408f4ded
The JSON path parsing code assumes that string keys within square brackets in JSON paths will be valid, parseable JSON. However, the ajv library on which this project depends emits string keys in single quotes. For example, ajv can emit .foo['bar'], which will ultimately end up with a call to JSON.parse("'bar'"). This causes the "Unexpected token ' in JSON at position 0" error thrown from JSON.parse. Since ajv shouldn't need to change and since this utility is gone in the next branch, this fix checks for ajv-formatted string keys and patches them to double-quoted strings before calling JSON.parse. This is the narrowest fix for the problem. |
||
---|---|---|
.. | ||
couchdbeditor.html | ||
largefile.json | ||
test_bootstrap.html | ||
test_build.html | ||
test_build_min.html | ||
test_destroy.html | ||
test_materialize.html | ||
test_minimalist_min.html | ||
test_schema.html | ||
util.test.js |