As we well know, JSON doesn't support NaN, Infinity and big integers notably. I've recently heard about CBOR, which stands for Concise Binary Object Representation: RFC 8949. It seems to support everything we need and there are libraries for both Python and JS.
We could support this format just like we support others, like JSON, NPY, etc., via the format query param.
Currently, in H5WebProvider, we fetch either as binary for numeric arrays/scalars and opaque datasets, or as JSON for everything else (compound, vlen, etc.) We could instead always fetch as CBOR, which would allow us to remove quite a bit of logic from the provider (like deciding which typed array constructor to create based on the dataset's dtype).
As we well know, JSON doesn't support
NaN,Infinityand big integers notably. I've recently heard about CBOR, which stands for Concise Binary Object Representation: RFC 8949. It seems to support everything we need and there are libraries for both Python and JS.We could support this format just like we support others, like JSON, NPY, etc., via the
formatquery param.Currently, in
H5WebProvider, we fetch either as binary for numeric arrays/scalars and opaque datasets, or as JSON for everything else (compound, vlen, etc.) We could instead always fetch as CBOR, which would allow us to remove quite a bit of logic from the provider (like deciding which typed array constructor to create based on the dataset's dtype).