JSON+ de/serializer in pure lua

This folder defines an LSON spec and an example public domain pure-lua implementation of LSON/JSON encoder and decoder.

Note: If you want highly performant or compliant JSON library then use a different one. This library is part of the civstack project and is optimized for simplicy and improved features.

LSON spec

LSON is a strict superset of JSON: all valid JSON is valid LSON but not vice versa. The difference is:

Command lson

lson JSON+ command and library.

Cmd usage: lson path/to/file.json
The command pretty-prints JSON+ as a lua object.

Lib usage: tbl = lson.decode('{1: 2}')
As a library it allows de/serialization of JSON+ to/from Lua values.

Types: Json Lson De

Methods and Functions

Record Json

Json Encoder (via fmt.Fmt) This works identically to metaty.Fmt except it overrides how tables are formatted to use JSON instead of printing them.

Fields:

Methods

Record Lson

Similar to JSON but no commas and strings are encoded as |bytes|

Fields:

Methods

Record De

De(string or lines) -> value-iter for val in De'["my", "lson"]' do ... end

Fields:

Methods