json is a module that provide fast json APIs for lua.
It based on the RapidJSON ( [1]) library.
APIs included:
- `json.decode()` decode json to lua table.
- `json.encode()` encode lua table to json string.
- `json.load()` load json file into lua table.
- `json.dump()` dump lua table to json file.
It has tested with Lua 5.1 5.2 5.3 and LuaJIT 2.0 2.1 on Windows 7, Linux (travis) and MacOS 10.10 [footnote].
Please visit GitHub project for source, documentation (in README.md), bug report and discussions:
It also have submitted to luarocks [2], just
> luarocks install json
--------------------------
[footnote]: for MacOS with Lua 5.2, the follow 2 test expected error in are not passed(no error raised):
Suggestion and help about the 2 test are welcomed!
Best Regards!
Xpol Wan
// There is a better way!