BSON (.bson) File Format - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : Input and Output : File Formats : Formats/BSON

BSON (.bson) File Format

BSON file format

 

Description

Notes

Examples

Description

• 

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.

Notes

• 

Content-Type: application/bson

Examples

Parse a BSON string as an expression.

byteArrArray19,0,0,0,16,120,0,116,0,0,0,16,121,0,79,1,1,1,0,datatype=integer1

byteArr19000161200−116000161210−79−1−1−10

(1)

ImportbyteArr,format=BSON,source=direct

tablex=140,y=−79

(2)

Import data from a file in BSON format.

UNDHRImportexample/UNDHR.bson,base=datadir

UNDHRtableratification=<Time: 1970-01-01T00:00:00 - 664549200000 ms>&comma;event=United Nations Declaration of Human Rights&comma;location=tablecity=Paris&comma;country=France&comma;name=Palais de Chaillot&comma;address=1 Place du Trocadéro et du 11 Novembre

(3)

DateUNDHRratification

<Date: 1948-12-10T11:00:00 GMT>

(4)

Export data to a BSON file in the home directory of the current user.

MousetableGenus=Mus&comma;Species=musculus

MousetableGenus=Mus&comma;Species=musculus

(5)

MouseFamilyMuridae

MouseFamilyMuridae

(6)

MouseOrderRodentia

MouseOrderRodentia

(7)

MouseClassMammalia

MouseClassMammalia

(8)

Exportmouse.bson&comma;Mouse&comma;base=homedir

81

(9)

See Also

Formats

Formats,JSON

Formats,UBJSON