kstenerud/bonjson
View on GitHub ↗ ★ 31
A lightning-fast and efficient 1:1 compatible binary drop-in replacement for JSON
11 mentions on Hacker News by 1 person: 0 stories, 11 comments · first 2025-02-22 · latest 2026-09-28
20082026
-
…that break roundtrip compatibility. Was a fun little project to write, and quite useful for me: https://github.com/kstenerud/bonjson
comment by kstenerud · 2026-09-28 · in Packing Binary Is Fun -
…(and ieee774 floats) a couple of years ago (first byte encodes length and first bit of data: https://github.com/kstenerud/bonjson/blob/05b91f6fe7d6b07186... ). It was very clever and used compiler intrinsics to get the length in 1…
comment by kstenerud · 2026-05-29 · in Bijou64: A variable-length integer encoding -
…into the trap of adding extra things that make them incompatible with JSON. It's why I wrote https://github.com/kstenerud/bonjson/
comment by kstenerud · 2026-04-18 · in Binary Encodings for JSON and Variant -
…Claude, I'm now able to achieve 100x more than I could have without it. In one week, I fine-tuned https://github.com/kstenerud/bonjson/ for maximum decoding efficiency and: * Had Claude do a go version (…
comment by kstenerud · 2026-01-21 · in The Agentic AI Handbook: Production-Ready Patterns -
…that implementations must disable NUL by default (as in, the default configuration must disallow). https://github.com/kstenerud/bonjson/blob/main/bonjson.md#nu... Users can of course enable NUL in the rare cases where they need it, but I…
comment by kstenerud · 2026-01-03 · in FracturedJson -
…the better! I've also been working in the other direction, making JSON more machine-readable: https://github.com/kstenerud/bonjson/ It has EXACTLY the same capabilities and limitations as JSON, so it works as a drop-in replacement that's…
comment by kstenerud · 2026-01-02 · in FracturedJson -
…representation of JSON-structured data that uses unary coding for variable length length fields: https://github.com/kstenerud/bonjson/blob/main/bonjson.md#le... This tends to confuse generic compressors, even though the sub-byte data…
comment by kstenerud · 2025-10-07 · in OpenZL: An open source format-aware compression framework -
…no ability to branch predict reliably). It's why I used a right-to-left unary code in my stuff: https://github.com/kstenerud/bonjson/blob/main/bonjson.md#le... | Header | Total Bytes | Payload Bits | | ---------- | ----------- |…
comment by kstenerud · 2025-09-13 · in UTF-8 is a brilliant design -
…of BONJSON, so it must also implement all of BONJSON. * The BONJSON reference material is here: https://github.com/kstenerud/bonjson/blob/main/bonjson.md * The formal grammar desribing BONJSON is here:…
comment by kstenerud · 2025-08-22 · in AWS CEO says using AI to replace junior staff is 'Dumbest thing I've ever heard' -
…only beef is with the serialization/deserialization costs. That's why I've made a 1:1 binary format https://github.com/kstenerud/bonjson
comment by kstenerud · 2025-02-24 · in JSON has become today's machine-readable output format on Unix -
…make them not 1:1 compatible (able to be round-tripped without losing data or requiring a schema). https://github.com/kstenerud/bonjson It's also super simple to implement. The reference implementation in C is less than 500 LOC of clean,…
comment by kstenerud · 2025-02-22 · in Ask HN: What Are You Building?