Closed romange closed 1 year ago
the first step (PR) will be - to support json object inside CompactObject as a separate tag (JSON_TAG part of TagEnum).
it should support creation, destruction, and return a dedicated type via ObjType() access method.
step zero is merged into the main branch - JSON.SET can set valid data on top of string storage. I think the command should work on string storage when the existing data within the string is valid JSON and of course on the new JSON type that should be implemented in step one.
The next step should include: New type entry for "CompactObj" inside "union U" (line 332). The new type will be dispatched based on a new entry in TagEnum. This means that this new type cannot be a string type. This object will help not running the json parsing again and again and it must be aligned as size with "RobjWrapper". When a JSON command is dispatched to process value or setting new value, it would lookup or setup the new type that this would create.
This new entry to compact object - the json type, is not compliant with the format the Redis are saving for JSON (the Redis github for JSON support is here, but we are not going to reference it!).
This is over for now, we have an internal issue opened on the missing custom allocator that need to be added to jsoncons for this we have a special issue to update the code once the jsoncons is ready. But since the issue for supporting custome allocator is still open, there is no reason to leave this open as well.
See https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/json-set.html
Furthermore, when using elasticache redis instance:
we get
ReJSON-RL
similarly,scan 0 type ReJSON-RL
should returnfoo
.Related to #104