support for JSON commands
AWS Elasticache recently released JSON support as part of their service.
We should implement a compatible API. See https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/json-list-commands.html
for command reference.
https://github.com/danielaparker/jsoncons/tree/master/include/jsoncons is a good candidate for supporting jsonpath.
@iko1 pls take a look at this issue. You can continue working on Json branch - https://github.com/dragonflydb/dragonfly/tree/Json .
The initial milestone would be to add json_familyXX files that implement JSON.GET command.
The syntax is json.get <key> <path>. See elasticache documentation for that.
the command should work on string types. it should try and parse the string into json. if it succeeds, apply the "path" query on the json object. The command should handle properly states like wrong type or "not a json" and output the error response accordingly.
Due to #238 we must introduce internally a dedicated type for json. That means we must support JSON_TAG inside compact_object and make json type a first-class citizen. Still, I want relaxed semantics for READONLY json commands. For example, JSON.GET should work on both strings and json types. JSON.SET should produce json types only.
@romange, I assume you can close this issue after all JSON commands were merged into the main branch.
Thanks @iko1 . I still consider #238 unfinished. The team will continue from here (add "scan", "type" integration. add rdb support etc).
@romange, The basic JSON support is done with some exceptions like what you mentioned. Can you elaborate on the missing things that should be implemented when I have a spare time can I take them on myself?
You already did huge part of this effort. I would like to finish the rest internally 🙏
On Sat, Nov 26, 2022, 20:19 iko1 @.***> wrote:
@romange https://github.com/romange, The basic JSON support is done with some exceptions like what you mentioned. Can you elaborate on the missing things that should be implemented when I have a spare time can I take them on myself?
— Reply to this email directly, view it on GitHub https://github.com/dragonflydb/dragonfly/issues/104#issuecomment-1328092130, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4BFCGOAPLYO5LIOJXNG33WKJIBJANCNFSM5X6IZLOA . You are receiving this because you were mentioned.Message ID: @.***>
Closing as finished, will open a new task for the missing features.
