Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change required top level object to be either array or object type #82

Closed
2 tasks
b5 opened this issue Feb 14, 2018 · 0 comments · Fixed by #84
Closed
2 tasks

change required top level object to be either array or object type #82

b5 opened this issue Feb 14, 2018 · 0 comments · Fixed by #84
Assignees
Labels
feat A code change that adds functionality

Comments

@b5
Copy link
Member

b5 commented Feb 14, 2018

For a while now I've been rather insistent that the top level of a dataset be an array. I've now come across a number of examples in the wild where having an object as the top level is just plain necessary. For example:

data.json catalogs
top level is an object. It's a dataset. qri should get over it.

site maps
Doing de-duplicated sitemaps is much easier using normalized urls as keys in an object.

So based on this, I think we need to relax the definition to say that a top level dataset needs to be either an array or an object. This'll affect a few things:

  • dsio.Reader will need to recognize object keys as entries
  • any validation needs to be cool with { "type": "array" } or {"type":"object"} as a root schema

I'll add to that list as things go.

@b5 b5 added the feat A code change that adds functionality label Feb 14, 2018
@b5 b5 self-assigned this Feb 14, 2018
@ghost ghost added the in progress label Feb 14, 2018
@b5 b5 closed this as completed in #84 Feb 19, 2018
@ghost ghost removed the in progress label Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat A code change that adds functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant