[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: JSON module
- From: David Kolf <kolf@...>
- Date: Sat, 28 Aug 2010 22:43:21 +0200
I have written a JSON module implemented in pure Lua without
dependencies to other external libraries. It supports UTF-8.
The file is called dkjson.lua to avoid conflicts with other JSON modules
that already exist. It doesn't write any global variables, so you can
give it any name you want when you use require.
I have put a comparison of different JSON modules for Lua known to me in
the wiki: http://lua-users.org/wiki/JsonModules
In summary Lua-YAJL appears to be the best, the few disadvantages I
found should be more or less easy to patch.
For Lua-only modules my version appeared to me to be the best, both
regarding speed and compatibility to the standard.
Today I learned how to use the LPeg module and in my local test version
of dkjson I already added optional support for it. The speed up for
decoding is significant, so I will probably release a version 2.0 soon.