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