caltechlibrary / dataset

dataset is a command line tool, Go package, shared library and Python package for working with JSON objects as collections
https://caltechlibrary.github.io/dataset
Other
23 stars 4 forks source link

JSON documents of arrays #122

Open rsdoiel opened 1 year ago

rsdoiel commented 1 year ago

Originally dataset sought to store JSON objects in collections. JSON can also represent arrays, [ "one", "two", "three" ]. Since dataset v2 no longer modifies the object being stored it should be possible for those documents representing JSON arrays and not be limited to objects. This would allow us to store objects like pick/universe "select lists" of keys along in the collection perhaps by using a convention around key formation (e.g. _select could be an active select, _my_saved_keys could be an explicit saved list of keys). This could be helpful in some data processing scenarios and void having to embed the array inside a wrapping object.