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≔Array⁡19,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
Import⁡byteArr,format=BSON,source=direct
table⁡x=140,y=−79
Import data from a file in BSON format.
UNDHR≔Import⁡example/UNDHR.bson,base=datadir
UNDHR≔table⁡event=United Nations Declaration of Human Rights,ratification=<Time: 1970-01-01T00:00:00 - 664549200000 ms>,location=table⁡country=France,city=Paris,address=1 Place du Trocadéro et du 11 Novembre,name=Palais de Chaillot
Date⁡UNDHRratification
<Date: 1948-12-10T11:00:00 GMT>
Export data to a BSON file in the home directory of the current user.
Mouse≔table⁡Genus=Mus,Species=musculus
Mouse≔table⁡Species=musculus,Genus=Mus
MouseFamily≔Muridae
MouseOrder≔Rodentia
MouseClass≔Mammalia
Export⁡mouse.bson,Mouse,base=homedir
81
See Also
Formats
Formats,JSON
Formats,UBJSON
Download Help Document