ra1u / redis-dart

fast redis protocol parser and client
MIT License
84 stars 35 forks source link

JSON.GET <key> <JSON Path> not working #79

Closed tricaricom closed 1 year ago

tricaricom commented 1 year ago

Using the Redis-CLI, I can run a JSON.GET query such as

JSON.GET h4:9q9h 'd.[?(@.id=="e5dbaa67-c953-4903-bf79-682f82f8c42d")]'

But when I run this through redis-dart, I get an error such as

RedisError(JSON Path error: path error: \n$.'d.[?(@.id=="e5dbaa67-c953-4903-bf79-682f82f8c42d")]'\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n)

It looks like it's adding a $. and that may be throwing off the byte boundaries? Has anyone else experienced this?

My RedisJSON key/value is structured like this

key: h4:9q9h

value: { d: [ { id: "e5dbaa67-c953-4903-bf79-682f82f8c42d" }, { id: "..." } ] }

ra1u commented 1 year ago

Hi tricaricom

Than you for your report.

It would be appreciated, if you can share relevant code, so that your issue can be fully replicated on our side unambiguously and should include both set and get commands. We plan to use and test such code against test

Kind regards, Luka

ra1u commented 1 year ago

Closed due to inactivity. Please add relevant info as in prevous post to reopen this issue.