UBJSON (.ubj) File Format - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

UBJSON (.ubj) File Format

UBJSON file format

 

Description

Notes

Examples

Description

• 

UBJSON (Universal Binary JSON) is a binary data standard for describing structured data made of key-value pairs and lists based on the JSON standard.

• 

The general-purpose commands Import and Export permit parsing and generating UBJSON files and expressions.

Notes

• 

Content-Type: application/ubjson

Examples

Parse a UBJSON string as an expression.

byteArrArray123,35,105,2,105,1,120,85,116,105,1,121,105,79,datatype=integer1

byteArr123351052105112085−1161051121105−79

(1)

ImportbyteArr,format=UBJSON,source=direct

tabley=−79,x=140

(2)

Import data from a file in UBJSON format.

Importexample/address.ubj,base=datadir

tablefounded=1988,address=tablestreetAddress=615 Kumpf Drive,postalCode=N2V 1K8,city=Waterloo,province=ON,country=Canada,companyName=Maplesoft,phoneNumbers=tablenumber=+1 (519) 747-2373,type=local,tablenumber=+1 (800) 267-6583,type=tollfree,tablenumber=+1 (519) 747-5284,type=fax

(3)

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

MousetableGenus=Mus,Species=musculus

MousetableSpecies=musculus,Genus=Mus

(4)

MouseFamilyMuridae

MouseFamilyMuridae

(5)

MouseOrderRodentia

MouseOrderRodentia

(6)

MouseClassMammalia

MouseClassMammalia

(7)

Exportmouse.ubj,Mouse,base=homedir

81

(8)

See Also

Formats

Formats,BSON

Formats,JSON