tidwall / gjson

Get JSON values quickly - JSON parser for Go
MIT License
14.1k stars 846 forks source link

Array query does not support values with quote #215

Closed AlexanderYastrebov closed 3 years ago

AlexanderYastrebov commented 3 years ago

Testing path friends.#(last=="Mur\"phy").first and the document:

{
  "name": {"first": "Tom", "last": "Anderson"},
  "age":37,
  "children": ["Sara","Alex","Jack"],
  "fav.movie": "Deer Hunter",
  "friends": [
    {"first": "Dale", "last": "Mur\"phy", "age": 44, "nets": ["ig", "fb", "tw"]},
    {"first": "Roger", "last": "Craig", "age": 68, "nets": ["fb", "tw"]},
    {"first": "Jane", "last": "Murphy", "age": 47, "nets": ["ig", "tw"]}
  ]
}

in the playgroud https://gjson.dev/ produces empty result while expected to produce "Dale".

tidwall commented 3 years ago

Thanks for reporting. I fixed it and pushed an update.