[OT] [ANN] JSON (and co.) C++ library adding support for SQLite JSONB
(1) By ddevienne on 2026-04-20 14:39:36 [link] [source]
(2) By Roger Binns (rogerbinns) on 2026-04-20 18:30:45 in reply to 1 [source]
Some notes on the doc. (My own list of related issues for reference)
You need to say what happens with UTF8 validation
Infinityis output as9e999by SQLite notnullwhich will become infinity in fp64, but not larger sizes.JSONB does not spec INT/INT5 as fitting in 64 bits - there is no explicit size limit. The floating point equivalents also don't limit to fp64. I happily produce larger ones since Python is not limited to 64 bit ints or floats.
In the doc you may want to mention that JSONB has no identifying header - I checked various lengths to see what proportion of bytes are valid.
(3) By ddevienne on 2026-04-21 08:17:56 in reply to 2 [link] [source]
Thanks for your comments Roger.
I'm not the Glaze library Author, Stephen Berry is.
I've shared your comments in https://github.com/stephenberry/glaze/discussions/2520
(4) By Vadim Goncharov (nuclight) on 2026-04-21 17:39:24 in reply to 2 [link] [source]
Yeah, unfortunately JSONB was now well though-out and planned as suitable format for decades, see discussions when it was introduced. Partially it is excused by being declared as SQLite's internal format - e.g. it means the whole idea of external libraries, such announced here, is doomed. Lack of header magic number is not among those excuses, though... be it for just different versions of JSONB itself or other binary formats which people may place into their BLOB fields (bugs of similar nature were already discovered soon after JSONB addition).