UBJSON (.ubj) File Format
UBJSON file format
Description
Notes
Examples
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.
Content-Type: application/ubjson
Parse a UBJSON string as an expression.
byteArr ≔ Array⁡123,35,105,2,105,1,120,85,−116,105,1,121,105,−79,datatype=integer1
byteArr≔123351052105112085−1161051121105−79
Import⁡byteArr,format=UBJSON,source=direct
table⁡x=140,y=−79
Import data from a file in UBJSON format.
Import⁡example/address.ubj,base=datadir
table⁡companyName=Maplesoft,founded=1988,phoneNumbers=table⁡type=local,number=+1 (519) 747-2373,table⁡type=tollfree,number=+1 (800) 267-6583,table⁡type=fax,number=+1 (519) 747-5284,address=table⁡postalCode=N2V 1K8,streetAddress=615 Kumpf Drive,city=Waterloo,province=ON,country=Canada
Export data to a UBJSON file in the home directory of the current user.
Mouse ≔ table⁡Genus=Mus,Species=musculus
Mouse≔table⁡Species=musculus,Genus=Mus
MouseFamily ≔ Muridae
MouseFamily≔Muridae
MouseOrder ≔ Rodentia
MouseOrder≔Rodentia
MouseClass ≔ Mammalia
MouseClass≔Mammalia
Export⁡mouse.ubj,Mouse,base=homedir
81
See Also
Formats
Formats,BSON
Formats,JSON
Download Help Document
What kind of issue would you like to report? (Optional)