You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the Notes section of the BSON spec the seventh bullet described BinData. The third sub-bullet describes the user-defined type, "\x80-\xFF "User defined" subtypes. The binary data can be anything."
Our implementation limits this to only 0x80 and throws and error on other subtypes.
I propose that the UserDefined type be redefined to include a Word8 subtype field and that accompanying changes be made to the binary get and put functions.
data UserDefined = UserDefined Word8 ByteString
Use Case
The BSON format while more compact than JSON is still a rather verbose document particularly with the way it encodes arrays. I would like to leverage the UserDefined binary part of the spec to store packed vectors of data. Using the subtype field would allow me to identify what was in the packed date without having to use a separate field of tag.
The text was updated successfully, but these errors were encountered:
Proposal
In the Notes section of the BSON spec the seventh bullet described
BinData
. The third sub-bullet describes the user-defined type, "\x80-\xFF "User defined" subtypes. The binary data can be anything."Our implementation limits this to only 0x80 and throws and error on other subtypes.
I propose that the
UserDefined
type be redefined to include aWord8
subtype field and that accompanying changes be made to the binary get and put functions.Use Case
The BSON format while more compact than JSON is still a rather verbose document particularly with the way it encodes arrays. I would like to leverage the UserDefined binary part of the spec to store packed vectors of data. Using the subtype field would allow me to identify what was in the packed date without having to use a separate field of tag.
The text was updated successfully, but these errors were encountered: