# rxi/json.lua

A lightweight JSON library for Lua

Repository: https://github.com/rxi/json.lua
Canonical: https://ross.abutalabs.com/products/jsonlua
Language: Lua
License: MIT
License Family: permissive
Last push: 2023-11-28T04:38:13+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4039, "days_push": 1009, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2186, forks 375 (observed 2026-08-28T04:06:23.687142+00:00)

## What it is
A tiny, pure-Lua JSON encoding and decoding library that works with Lua 5.1, 5.2, 5.3, and LuaJIT. It is a single ~280-line file with no dependencies, offering fast performance and clear error messages.

## Use cases
- encode Lua tables to JSON strings
- decode JSON strings into Lua tables
- parse JSON API responses in a Lua project
- serialize game or app config data as JSON
- drop-in JSON support for LuaJIT or Lua 5.1-5.3

## When to choose
- you need a dependency-free, single-file JSON library in pure Lua
- you need compatibility across Lua 5.1 through 5.3 and LuaJIT
- performance of pure-Lua JSON encoding/decoding matters
- you want clear error messages with line and column info

## When to avoid
- you need pretty-printed JSON output
- you need to preserve JSON null values inside arrays or objects
- you need a C-speed JSON parser for very high throughput
- you need support for sparse arrays or mixed key types without errors

## Facets
- artifact type: library
- maturity: stable
- function: serialization, parser
- domain: developer-tools, web-development, apis
- platform: lua, cross-platform
- tags: pure-lua, -encoder, -decoder, lightweight, single-file

## Member repositories
- rxi/json.lua (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:23.687142+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:47:55.503401+00:00, confidence not recorded.
  - readme: https://github.com/rxi/json.lua (fetched 2026-08-28T04:06:23.687142+00:00, sha 1cd05c8ce1e0)
- Data as of 2026-08-30T08:39:29.467469+00:00.
