Closed kirillt closed 6 months ago
I prefer the second option, nested syntax. It seems very clear to me also a user might include a key-value pair where the key is the word "version"
It'll also make data extraction easier since we won't have to exclude the entry with the key "version"
We have mixed format now:
version 2
came from the legacy plain-text formatThis makes the format not so ergonomic, power users need to perform extra step to remove the header:
It's better to complete transition to JSON.
Option 1: "Flat syntax"
If we declare
version
in the mapping itself, we'd need to handle it as a special field before reading the entries:Can it cause problems when we expect non-string keys in the storage? E.g. with the following storage:
Option 2: "Nested syntax"
We can use the nested JSON structure, where top-level always consists of 2 fields:
version
, andentries
. The latter lists all key-values inside:This format is explicit, no type inconsistencies but the format is more verbose.