<commit_before># ![json.lua](https://cloud.githubusercontent.com/assets/3920290/9207222/24413cbe-4064-11e5-874e-7e2deeb5f8cb.png)  
A lightweight JSON library for Lua


## Features
* Pure Lua implementation
* Tiny: around 270sloc, 8kb
* Proper error messages, *eg:* `expected '}' or ',' at line 203 col 30`


## Usage
The [json.lua](json.lua?raw=1) file should be dropped into an existing project
and required by it:
```lua
json = require "json"<commit_msg>README updates<commit_after># ![json.lua](https://cloud.githubusercontent.com/assets/3920290/9281532/99e5e0cc-42bd-11e5-8fce-eaff2f7fc681.png)  
A lightweight JSON library for Lua


## Features
* Implemented in pure Lua: works with 5.1, 5.2, 5.3 and JIT
* Fast: generally outperforms other pure Lua JSON implementations
  ([benchmark scripts](bench/))
* Tiny: around 270sloc, 8kb
* Proper error messages, *eg:* `expected '}' or ',' at line 203 col 30`


## Usage
The [json.lua](json.lua?raw=1) file should be dropped into an existing project
and required by it:
```lua
json = require "json"
{'fraction_non_alphanumeric': 0.12893982808022922, 'fraction_numerical': 0.08404966571155682, 'mean_word_length': 4.9209039548022595, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4751606', 'n_tokens_mistral': 428, 'n_tokens_neox': 360, 'n_words': 110}