[ANN] lua-xjson 0.9.0 beta

78 views
Skip to first unread message

André Naef

unread,
Sep 14, 2026, 8:35:48 AM (11 days ago) Sep 14
to lua-l
Hello list,


I am pleased to announce lua-xjson 0.9.0 beta, an MIT-licensed JSON encoder and decoder for Lua 5.4 and 5.5 targeting 64-bit Linux.

lua-xjson was created for fast JSON processing with fine-grained, per-request control. Encoded output can be returned as a string or written directly to a file. UTF-8 can be validated during both encoding and decoding. Input property order can be retained during decoding; during encoding, properties can be selected and ordered explicitly or sorted by raw bytes into a canonical property order for deterministic output. Finally, the library can optionally accept common extensions to JSON, including a UTF-8 byte-order mark, comments, trailing commas, and non-finite numeric literals.

I understand that the word “fast” on this list comes with a benchmark tax. The method, corpus, environments, and results are available here:
https://github.com/anaef/lua-xjson/tree/main/benchmarks

The page also describes the principal implementation techniques used to improve performance and credits the work from which some of them were adapted. To the best of my knowledge, lua-xjson 0.9.0 achieves state-of-the-art performance across a majority of the benchmark workloads tested.

All feedback is welcome.


Cheers, André

Marc Balmer

unread,
Sep 14, 2026, 8:46:39 AM (11 days ago) Sep 14
to lu...@googlegroups.com

Here is another JSON implementation which you can benchmark against: https://github.com/arcapos/luajson

(written in C, targeting Linux)

- mb

ps: "fast" was not my priority when I wrote it...

--
You received this message because you are subscribed to the Google Groups "lua-l" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lua-l+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/lua-l/76f565d6-e78b-4c6a-8ee4-ce124a1e4366n%40googlegroups.com.

Martin Eden

unread,
Sep 15, 2026, 3:05:20 AM (10 days ago) Sep 15
to lu...@googlegroups.com
On 2026-09-14 14:46, Marc Balmer wrote:
>
> Here is another JSON implementation which you can benchmark against:
> https://github.com/arcapos/luajson
>
> (written in C, targeting Linux)
>
> - mb
>
> ps: "fast" was not my priority when I wrote it...
>
You are in different weight categories.

"arcapos/luajson" release weights 6 KB, "anaef/lua-xjson" 65 KB.

-- Martin

André Naef

unread,
Sep 15, 2026, 5:22:17 AM (10 days ago) Sep 15
to lua-l
Indeed. I would add that "small" was not my priority when I wrote anaef/lua-xjson. One of the tradeoffs.
Reply all
Reply to author
Forward
0 new messages