Practically, there are 2 ways to identify an array or group: by name, or by <name>/zarr.json. The former is the "hierarchy name", and the latter is the actual storage key that defines the presence of the array or group.
The hierarchy name is generally not a stored object, but rather a prefix. On local storage, this means <name> is a directory, and on object storage, <name> does not resolve to anything, it has no content type, etc. By contrast, <name>/zarr.json is a stored object.
This means there are some advantages to identifying a Zarr array or group by its stored representation, i.e. <name>/zarr,json:
- As a file, zarr,json can easily support drag + drop behavior for GUI applications that work with conventional single-file data formats.
- as a resource, zarr.json can be associated with a JSON schema and a content type.
However, to support these two forms of declaration (<name> or <name>/zarr.json), a client would need a way to distinguish them structurally. Is <name>/zarr.json the name of a group called zarr.json (i.e., should the client check if <name>/zarr.json/zarr.json exists?), or the key of a metadata document for the group called <name>? On object storage both could even be true -- zarr.json and zarr.json/zarr.json can both be the keys for metadata documents.
To allow clients to treat <name> and <name>/zarr.json as valid identifiers for the array or group <name>, we need to exclude the possibility that <name>/zarr.json is the name of an array or group. IMO the best way to do this is by stipulating that arrays and groups MUST not be named zarr.json. If we add this restriction, then users can safely pass strings like foo OR foo/zarr.json into zarr-aware applications without ambiguity, and Zarr data can be declared in an object-stored-friendly way.
Practically, there are 2 ways to identify an array or group: by name, or by
<name>/zarr.json. The former is the "hierarchy name", and the latter is the actual storage key that defines the presence of the array or group.The hierarchy name is generally not a stored object, but rather a prefix. On local storage, this means
<name>is a directory, and on object storage,<name>does not resolve to anything, it has no content type, etc. By contrast,<name>/zarr.jsonis a stored object.This means there are some advantages to identifying a Zarr array or group by its stored representation, i.e.
<name>/zarr,json:However, to support these two forms of declaration (
<name>or<name>/zarr.json), a client would need a way to distinguish them structurally. Is<name>/zarr.jsonthe name of a group calledzarr.json(i.e., should the client check if<name>/zarr.json/zarr.jsonexists?), or the key of a metadata document for the group called<name>? On object storage both could even be true --zarr.jsonandzarr.json/zarr.jsoncan both be the keys for metadata documents.To allow clients to treat
<name>and<name>/zarr.jsonas valid identifiers for the array or group<name>, we need to exclude the possibility that<name>/zarr.jsonis the name of an array or group. IMO the best way to do this is by stipulating that arrays and groups MUST not be namedzarr.json. If we add this restriction, then users can safely pass strings likefooORfoo/zarr.jsoninto zarr-aware applications without ambiguity, and Zarr data can be declared in an object-stored-friendly way.