ubjson / universal-binary-json

Community workspace for the Universal Binary JSON Specification.
116 stars 12 forks source link

xtype format, a superset to UBJSON #106

Closed bitagoras closed 5 years ago

bitagoras commented 5 years ago

I created another general-purpose format, mainly inspired by UBJSON: https://github.com/bitagoras/xtype/

The reason why I started a few years ago with this format was that I struggeled with restrictions of HDF5 and I was looking for an alternative. UBJSON seemed to me too much focused on a binary version of JSON data structures while I required something where I can also handle very big files. In HDF5 you can very quickly read a matrix-subset out of a huge data file by random access. In UBJSON it seemed to me not so convenient to do this since it would require to define tables of content. In HDF5 the data handling is strictly separated from the actual data structure and hidden from the user of the library. The solution I finally found is the Xenote format which can hide such information in a special rule. Xenote also has one important property of JSON: the grammar can be defined quite well graphically, which is something I really appreciate about JSON.

UBJSON pursues a slightly different objective than Xenote. For example objects identifiers are only strings in UBJSON while Xenote also allows other values like in the dict type of Python where keys can be e.g. lists of numbers. Nevertheless I would be glad, if you find some inspirations for UBJSON in Xenote, as I did the other way round.