cf-json / cf-json.github.io

Apache License 2.0
0 stars 2 forks source link

Make `data` optional? #11

Open aportagain opened 5 years ago

aportagain commented 5 years ago

Split out for further discussion from https://github.com/cf-json/cf-json.github.io/issues/10 , where @kwilcox originally pointed out that

1. `data` is required in `cf-json` and optional in `nco-json`

My own perspective in summary: if making data in some way optional has advantages for other people's use cases I'm sure we can deal with that for ours :)

aportagain commented 5 years ago

It would be good if we could ensure this only adds minimal complexity to a parser / consumer and has well-defined behaviour / meaning... Is the data object still present but null? Present but, potentially nested, empty array? Absent? And / or metadata-only attribute? How is this handled in round-trips, or at least conversions to netCDF? Is this allowed to vary between variables or groups, or rather a global either-or (one of our internal users mentioned the possibility of omitting coordinate variable data when the client / consumer is actually only interested in the non-coordinate variable data)?