mpx/lua-cjson
FreeLua CJSON is a fast JSON encoding/parsing module for Lua
FreeFree tier
About mpx/lua-cjson
Lua CJSON is a fast, standards-compliant JSON encoding and parsing module for Lua. It supports full UTF-8 JSON, including decoding of surrogate pairs, and provides optional runtime handling of non-standard JSON values such as infinity and NaN. The module has no external dependencies and is distributed under the MIT license. It includes a detailed manual covering installation and API usage. Note that UTF-16 and UTF-32 are not supported.
Key Features
Fast JSON encoding and parsing routines
Standards compliant with RFC 4627
Full support for UTF-8 JSON including surrogate pair decoding
Optional runtime support for infinity, NaN, and other non-standard JSON values
No external dependencies
MIT license
Includes a comprehensive manual (manual.adoc)
Pros & Cons
Pros
- Very fast performance for JSON operations
- No external dependencies, easy to integrate
- MIT license permits commercial and proprietary use
- Supports common JSON extensions like infinity and NaN
- Actively maintained with a stable release available
Cons
- Does not support UTF-16 or UTF-32 encoding
- Limited to the Lua ecosystem
- Not an AI tool; JSON library only
Best For
JSON serialization and deserialization in Lua applicationsConfiguration file parsing in Lua-based projectsData interchange between Lua and other systemsGame development where Lua is used for scriptingEmbedded systems requiring lightweight JSON handling
FAQ
What is Lua CJSON?
Lua CJSON is a fast and standards-compliant JSON encoding/parsing module for the Lua programming language.
Does Lua CJSON support UTF-8?
Yes, it fully supports JSON with UTF-8, including decoding of surrogate pairs.
Is Lua CJSON free to use?
Yes, it is distributed under the MIT license, which allows free use, modification, and distribution.
Does Lua CJSON have any external dependencies?
No, it has no dependencies on other libraries.
What JSON standards does Lua CJSON follow?
It follows RFC 4627 and provides optional extensions for non-standard values like infinity and NaN.
Does Lua CJSON support UTF-16 or UTF-32?
No, it does not support UTF-16 or UTF-32 encodings.