this is an annoying side effect of lua tables consider the following:
an empty table when encoded returns a map-like json structure
[david@foulplay ~]$ lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require('cjson')
> t= {}
> return cjson.encode(t)
{}