miniredis icon indicating copy to clipboard operation
miniredis copied to clipboard

lua cjson.decode("null") returns nil instead of cjson.null

Open vk-outreach opened this issue 5 years ago • 1 comments

In production redis, it looks like cjson.decode("null") returns cjson.null whereas the lua cjson in miniredis returns nil.

Maybe gopher-lua should be updated to match redis? The change involved seems a bit deep though (requires changing gopher-lua to return a special sentinel value and making cjson.null also return that sentinel value).

vk-outreach avatar Dec 18 '19 23:12 vk-outreach

Thanks,

miniredis already uses a fork, maybe you can have a look? https://github.com/alicebob/gopher-json

(I don't remember the reason we needed the fork, will have to look that up another day)

alicebob avatar Dec 19 '19 01:12 alicebob