The original mpx/cjson repository is inactive, whereas openresty/lua-cjson is being actively maintained.

While I'm unaware of any serious open issues with the current cjson, the fact that OpenResty's helps with encoding empty arrays would be a nice boon to Redis - see #856.

Comment From: nadavli-ma

I would really love to see this happening, we are currently forced to use costly programmatic "tricks" to be able to work with objects and empty arrays using lua scripts.

Comment From: yossigo

@itamarhaber Is it fully backwards compatible?

Comment From: zuiderkwast

It seems to be backwards compatible, since the array handling is optional and disabled by default (see the README), but this might be an issue if we're upgrading to Lua >= 5.2: https://github.com/openresty/lua-cjson/issues/36.

Comment From: itamarhaber

I don't see us upgrading to > 5.1 any time soon, regrettably.