Hacker GitHub

← All repos

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

Mentions per year 11 mentions · busiest year 2026 (6)
20082026
  1. …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
  2. …(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
  3. …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
  4. …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 (…
  5. …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
  6. …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
  7. …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…
  8. …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
  9. …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:…
  10. …only beef is with the serialization/deserialization costs. That's why I've made a 1:1 binary format https://github.com/kstenerud/bonjson
  11. …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?