Redis Lua Differetiating empty array and object
问题 I encountered this bug in cjson lua when I was using a script in redis 3.2 to set a particular value in a json object. Currently, the lua in redis does not differentiate between an empty json array or an empty json object. Which causes serious problems when serialising json objects that have arrays within them. eval "local json_str = '{\"items\":[],\"properties\":{}}' return cjson.encode(cjson.decode(json_str))" 0 Result: "{\"items\":{},\"properties\":{}}" I found this solution https://github