BSON (.bson) File Format
BSON file format
Description
Notes
Examples
BSON (Binary JSON) is a binary data standard for describing structured data made of key-value pairs, lists, and various scalar data types, inspired by the JSON standard.
The general-purpose commands Import and Export permit parsing and generating BSON files and expressions.
Specifically, BSON byte arrays are mapped to Arrays and and BSON date/time values are mapped to Time objects.
Content-Type: application/bson
Parse a BSON string as an expression.
byteArr≔Array19,0,0,0,16,120,0,−116,0,0,0,16,121,0,−79,−1,−1,−1,0,datatype=integer1
byteArr≔19000161200−116000161210−79−1−1−10
ImportbyteArr,format=BSON,source=direct
tablex=140,y=−79
Import data from a file in BSON format.
UNDHR≔Importexample/UNDHR.bson,base=datadir
UNDHR≔tableevent=United Nations Declaration of Human Rights,ratification=<Time: 1970-01-01T00:00:00 - 664549200000 ms>,location=tablecountry=France,city=Paris,address=1 Place du Trocadéro et du 11 Novembre,name=Palais de Chaillot
DateUNDHRratification
<Date: 1948-12-10T11:00:00 GMT>
Export data to a BSON file in the home directory of the current user.
Mouse≔tableGenus=Mus,Species=musculus
Mouse≔tableSpecies=musculus,Genus=Mus
MouseFamily≔Muridae
MouseOrder≔Rodentia
MouseClass≔Mammalia
Exportmouse.bson,Mouse,base=homedir
81
See Also
Formats
Formats,JSON
Formats,UBJSON
Download Help Document