From 4dae1709c881b6d9da75d8f00e8fcadfb40d0d98 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 12 Oct 2020 15:10:01 -0700 Subject: [PATCH] Add the notion of a key suffix to metadata documents Closes #63 The rational is that backends may be explored by non zarr-aware tools, like a filesytem and a GUI browser like Finder/Explorer/Nautilus, and the `.json` extension will help to view/edit json in those. While it may seem like this shoudl be store specific, once again the fact that a zarr-hierarchy can be copied from one storage to another by non-zarr-aware tool indicate that this shoudl be handled above the sotre level. --- docs/protocol/core/v3.0.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/protocol/core/v3.0.rst b/docs/protocol/core/v3.0.rst index 423f2713..343a6926 100644 --- a/docs/protocol/core/v3.0.rst +++ b/docs/protocol/core/v3.0.rst @@ -792,6 +792,16 @@ containing the following names: For document using the default JSON encoding and format describe in this document then the value must be ``"https://purl.org/zarr/spec/protocol/core/3.0``. +``metadata_key_suffix`` + + A string containing a suffix to add to the metadata keys when saving into + the store. By default ``".json"``. + + .. note:: + + This suffix is used is used to allow non hierarchy + browsing and edditign by non-zarr-aware tools. + ``extensions`` An array containing zero or more objects, each of which identifies @@ -818,6 +828,7 @@ JSON is being used for encoding of group and array metadata:: { "zarr_format": "https://purl.org/zarr/spec/protocol/core/3.0", "metadata_encoding": "https://purl.org/zarr/spec/protocol/core/3.0", + "metadata_key_suffix" : ".json", "extensions": [] } @@ -828,6 +839,7 @@ ignored if not understood:: { "zarr_format": "https://purl.org/zarr/spec/protocol/core/3.0", "metadata_encoding": "https://purl.org/zarr/spec/protocol/core/3.0", + "metadata_key_suffix" : ".json", "extensions": [ { "extension": "http://example.org/zarr/extension/foo",