I think there a two good variants of binary JSON equivalents: one where you have a minimal implementation that makes both reading and writing with the lowest amount of code possible, potentially feeding a SAX-like interface or constructing an in memory representation (DOM-style).
The other one would be to facilitate lookups in large documents such as json_extract without parsing the whole document. That would require some clever layout of the data, potentially even as in-file hash tables or similar. I assume that is what SQLite has done.
[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
I could say many things about it, but "simplest possible" is not one of them.
"Simple" in that it's trivial to decode with a bytestream and a jump table, and it can be written down very briefly.
https://github.com/civboot/civlua/blob/main/zoa/README.md
It's still in it's initial stages, but I'd love feedback :D
https://www.postgresql.org/docs/current/functions-xml.html
Iirc XML support in Postgres predates JSON support.