A quick update on UBJSON and Draft 9.
When the Draft 8 spec was originally released, I thought it would be the final version of the UBJSON spec. As the months wore on and more and more features and emails flowed into my inbox, I realized that we were far from done with the spec.
As work on Draft 9 began last year, I thought it would be a quick cycle for us, little did I realize the nuances of all the different uses of UBJSON that were going to come up and make me aware of how much attention to detail is required to really grow a spec in the right direction.
I have tried to keep all of the discussions about the changes coming in Draft 9 and 10 in the
GitHub Issues list for the spec so others can contribute, comment, etc. After months of discussions, I think we have a final list of changes for Draft 9 that will be finalized.
The only (huge) issue that could not get finalized for Draft 9 because we need more community involvement is the concept of an ultra-compact, efficient strongly-typed-container (STC) -- in many ways this is nothing more than an ARRAY type with a guaranteed single type of element in it -- it allows for a very compact storage of all the elements since every element in the container doesn't need its leading type marker.
It seems like a no-brainer to add this type to the spec right now, but one of the nuances we are still trying to figure out is that this type opens the door binary data in UBJSON, which opens the door to incompatibility with JSON. For example, converting an STC of int8 values to JSON results in an array of numeric (interger) values. Converting it back to UBJSON results in an ARRAY of int8 values which is NOT the same as the original value (an STC of int8 values). This lack of transitivity is a serious issue and one that we have not reached a consensus on.
If you have an opinion on this subject, I sincerely request that you read through the existing discussion and contribute your own thoughts to
Issue #13 (STC proposal).
I will continue to modify the spec at
http://ubjson.org with the new Draft 9 changes over the coming days.