ngff icon indicating copy to clipboard operation
ngff copied to clipboard

Specify the encoding of the json metadata

Open constantinpape opened this issue 2 years ago • 2 comments

should definitely be clarified in the spec. My initial vote would be to do the same as zarr (UTF-8, I think). cc @mrmh2

constantinpape avatar Jan 27 '22 10:01 constantinpape

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/next-call-on-next-gen-bioimaging-data-tools-2022-01-27/60885/11

imagesc-bot avatar Feb 09 '22 10:02 imagesc-bot

As far as I can tell https://zarr.readthedocs.io/en/stable/spec/v2.html is silent on the matter, which means in addition to https://github.com/zarr-developers/zarr-specs/issues/121 we may want to clarify the .zattrs expectations at the same time.

For reference from https://tools.ietf.org/id/draft-ietf-json-rfc4627bis-09.html#rfc.section.8.1 :

JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32. The default encoding is UTF-8, and JSON texts which are encoded in UTF-8 are interoperable in the sense that they will be read successfully by the maximum number of implementations; there are many implementations which cannot successfully read texts in other encodings (such as UTF-16 and UTF-32).

Implementations MUST NOT add a byte order mark to the beginning of a JSON text. In the interests of interoperability, implementations which parse JSON texts MAY ignore the presence of a byte order mark rather than treating it as an error.

joshmoore avatar Apr 07 '22 06:04 joshmoore