manzt / zarrita.js

A JavaScript toolkit for working with chunked, compressed, n-dimensional arrays
https://zarrita.dev
MIT License
38 stars 5 forks source link

Add json2 codec #153

Closed keller-mark closed 4 months ago

keller-mark commented 4 months ago

This is needed to support h5ad-via-kerchunk which embeds json2-encoded arrays of strings into the reference spec.

I ported this from the python implementation at https://github.com/zarr-developers/numcodecs/blob/0878717a3613d91a453fe3d3716aa9c67c023a8b/numcodecs/json.py#L34

manzt commented 4 months ago

Would you mind adding a changeset also, sorry!