mojo-json¶
mojo-json is a JSON serializer written in Mojo. The runtime and the code generator are Mojo. They do not wrap simdjson or any other C, C++, or Rust JSON library.
-
Why JSON
What JSON is, how objects, arrays, strings, and numbers work, and how pretty-print, JSON Lines, Pointer, and Patch fit together.
-
Instructions
Install Mojo 1.1.0 with pixi, write a JSON Schema, generate Mojo, run the tests, and publish this site.
-
Examples
Encode and decode generated types,
JsonValue, JSON Lines, pretty-print, Pointer, and Patch. -
Techniques
How encode and decode work: pre-sized writes, SIMD scan, SWAR digits, one-pass floats, and which ideas were measured and dropped.
-
Test data
What lives under
testdata/(schemas, oracle text, JSON Lines, Pointer samples) and why each file is there.