Jsmn - a world fastest JSON parser - in pure Nim
According to this benchmark script with about 3MB JSON of World Bank dataset, JSMN is 2-2.5 times faster than marshal
import jsmn
const
json = """{
"user": "johndoe",
"admin": false,
"uid": 1000,
"groups": ["users", "wheel", "audio", "video"]}"""
var tokens = newSeq[JsmnToken](32) # expect not more than 32 tokens
let r = parseJson(json, tokens)
for i in 1..r:
var token = addr tokens[i]
echo "Kind: ", token.kind
echo "Value: ", json[token.start..<token.stop]