lua-cjson icon indicating copy to clipboard operation
lua-cjson copied to clipboard

How to get empty json array,use cjson

Open hiallo opened this issue 4 years ago • 0 comments

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.

hiallo avatar Sep 08 '21 08:09 hiallo