lua-cjson
lua-cjson copied to clipboard
How to get empty json array,use cjson
root@tt:~# lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio (double int32)
> j = require 'cjson'
>
> s = {"",""}
>
> print(j.encode(s))
["",""]
> s = {nil,nil}
>
> print(j.encode(s))
{}
>
How to get empty json array,use cjson.