We have a need for multi-dimensional data (like json), and currently use a record format for that that is derived from the SQLITE format with Serial Type/Size stored in varint Huffman encoding of twos-complement. It is a great fast, compact storage format. We added support for arrays and objects on top of it, but just recursive processing of blobs would allow for the same. However, we had to build our own make/extract/expression extensions from scratch to do this.
It would be very helpful if SQLITE can expose its internal record serialization infrastructure a bit so that there is a way (using the API's) to create an array of sqlite3_value from a blob, and blob from sqlite3_value array. E.g.