alicebob / miniredis

Pure Go Redis server for Go unittests
MIT License
3.11k stars 217 forks source link

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

Open vk-outreach opened 4 years ago

vk-outreach commented 4 years ago

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).

alicebob commented 4 years ago

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)