gemmaJSON
json parsing library based on bindings of simdjson
Wraps a native library — check OS Compatibility below for platform-specific linking notes.
Summary
| Latest Version | 0.1.0 |
|---|---|
| License | Apache-2.0 |
| CI Status | Failing |
| Downloads | 0 |
| Last Indexed | 2026-07-21 05:26 |
Tags
Authors
- saint
Installation
nimble install gemmaJSON
choosenim install gemmaJSON
git clone https://github.com/sainttttt/gemmaJSON
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| gemmaJSON | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Dependencies
| Package | Version | Optional |
|---|---|---|
| nim >= | 2.0.0 | No |
Source
| Repository | https://github.com/sainttttt/gemmaJSON |
|---|---|
| Homepage | https://github.com/sainttttt/gemmaJSON |
| Registry Source | nimble_official |
README
gemmaJSON - simdjson bindings for Nim
nimble install gemmaJSON
Benchmarks
Test was for deserialization of reddit comment json dumps, checking if the entry was from a specific subreddit
name ................. min time avg time std dv times
sainttttt/gemmaJSON .. 13.291 s 13.386 s ±0.110 x15
treeform/jsony ....... 28.280 s 28.659 s ±0.366 x15
nim std/json ......... 72.095 s 73.678 s ±1.436 x15
Usage
var jsonObj = parseGemmajsonObj("""{"cat": {"a": ["woof", ["meow"], 2]}}""")
echo jsonObj.getStr("/cat/a/0")
# woof
echo jsonObj.getStr("/cat/a/1/0")
# meow
echo $jsonObj["cat"]["a"][0]
# woof
echo $jsonObj
# {"cat":{"a":["woof",["meow"],2]}}
var j = jsonObj.toJsonNode.pretty
echo j.pretty
# {
# "cat": {
# "a": [
# "woof",
# [
# "meow"
# ],
# 2
# ]
# }
# }
for e in jsonObj.getElement("/cat/a"):
echo $e
# woof
# ["meow"]
# 2