lua-users home
lua-l archive

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


Not yet, that git repo can not even checkout on Windows.

On Tue, Nov 1, 2016 at 2:59 AM Charles Heywood <vandor2012@gmail.com> wrote:
There was a JSON test suite in the list recently. Have you tried running it with that and documenting the results?

On Mon, Oct 31, 2016 at 7:14 AM Xpol Wan <xpolife@gmail.com> wrote:
Hi,

lua-rapidjson[1] 0.5.0 is released!

lua-rapidjson is a JSON module based on the very fast RapidJSON[2] library.
The RapidJSON has recently add support for JSON Pointer[3] and JSON Schema[4].

So lua-rapidjson has add these features.

New:

- Added rapidjson.Document, doc:get() and doc:set() is based on JSON Pointer.
- Added rapidjson.SchemaDocument and rapidjson.SchemaValidator for JSON Schema support.

Improved:

- Performance improvements (thanks RapidJSON), now the performance of lua-rapidjson is even better than lua-cjson (Tested on mac mini late 2012 with luajit 2.1.0-beta2 ).


Install:
> luarocks install rapidjson

New feature usage at a glance:

-- JSON pointer
local d = rapidjson.Document({a= {"b", "c"}})
assert(d:set('/a/0') == "b")
d:set('/a/0', 'd')

-- JSON Schema
local schema = rapidjson.SchemaDocument({ type= {"number", "string"} })
local validator = rapidjson.SchemaValidator(schema)

assert(validator:validate(rapidjson.Document('42')))
assert(not validator:validate(rapidjson.Document('{"a": "b"}')))

Detailed API reference can be found at https://github.com/xpol/lua-rapidjson/blob/master/API.md

Starts, Forks, Issues and Pull-requests are welcomed at Github Project Page[1]


--