ngff
ngff copied to clipboard
Specify the encoding of the json metadata
should definitely be clarified in the spec. My initial vote would be to do the same as zarr (UTF-8, I think). cc @mrmh2
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
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.