lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

adding -llua to the LDFLAGS made it for me on OSX 10.6.  Thanks All!

2011/5/10 agentzh <>
On Mon, May 9, 2011 at 10:59 AM, Mark Pulford <> wrote:
> Hi,
> Lua CJSON provides fast JSON parsing and encoding support for Lua
> using the C API.
> You can find it here:

Thank you for sharing this!

BTW, I've just noticed that it introduces extra spaces into the
resulting JSON when encoding stuffs, for example

   local cjson = require 'cjson'

and the output is

   { "dog": 3 }

Please note the extra spaces among tokens. I don't find any option to
disable that and it seems to me that the extra spaces are hard-coded
by looking at the C source. It'll be a (small) waste of bandwidth for
web applications. Am I missing something here?

Your cjson library makes me less motivated to introduce a native JSON
encoder/decoder in our ngx_lua nginx module ;)