luizperes / simdjson_nodejs

Node.js bindings for the simdjson project: "Parsing gigabytes of JSON per second"
https://arxiv.org/abs/1902.08318
Apache License 2.0
549 stars 25 forks source link

error in name for valueForKeyPath #68

Open gayratv opened 1 year ago

gayratv commented 1 year ago

I receive a file like this from the backend:

{
  "@avito-core/toggles:6.1.18": {
    "add_model_review_from": true
  }
 }

run standart code and see:

const JSONbuffer2 = simdjson.lazyParse(data); // external (C++) parsed JSON object
console.log(JSONbuffer2.valueForKeyPath('@avito-core/toggles:6.1.18'));

console.log(JSONbuffer2.valueForKeyPath('@avito-core/toggles:6.1.18'));
                        ^
Error: The JSON field referenced does not exist in this object.