It feels like it would be better to use a known binary encoding. I thought the MessagePack data model corresponded pretty much exactly to JSON ?
Edit: someone else mentioned BSON - https://bsonspec.org/
To be honest the wins (in this draft) don't seem that compelling
The advantage of JSONB over ordinary text RFC 8259 JSON is that JSONB is both slightly smaller (by between 5% and 10% in most cases) and can be processed in less than half the number of CPU cycles.
JSON has been optimized to death; it seems like you could get the 2x gain and avoid a new format with normal optimization, or perhaps compile-time options for SIMD JSON techniques
---
And this seems likely to confuse:
The "JSONB" name is inspired by PostgreSQL, but the on-disk format for SQLite's JSONB is not the same as PostgreSQL's. The two formats have the same name, but they have wildly different internal representations and are not in any way binary compatible.
---
Any time data is serialized, SOMEBODY is going to read it. With something as popular as sqlite, that's true 10x over.
So to me, this seems suboptimal on 2 fronts.