Close
Close window
JSON - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

JSON (.json) File Format

JSON file format

Description

JSON (JavaScript Object Notation) is a lightweight text-based data standard for describing structured data made of key-value pairs and lists.

As a human-readable format, it offers an alternative to explicitly tagged structured data such as XML.

The JSON package provides tools for parsing and generating JSON expressions.

The general-purpose commands Import and Export also support this format.

Notes

Content-Type: application/json

Examples

Parse a JSON string as an expression.

>

JSON:-ParseString[1, 2, 3.265, 6.01, 7.373]

1,2,3.265,6.01,7.373

(1)

Import data from a file in JSON format.

>

Importexample/address.json,base=datadir

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

(2)

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

>

MousetableGenus=Mus,Species=musculus

MousetableSpecies=musculus,Genus=Mus

(3)
>

MouseFamilyMuridae

MouseFamilyMuridae

(4)
>

MouseOrderRodentia

MouseOrderRodentia

(5)
>

MouseClassMammalia

MouseClassMammalia

(6)
>

Exportmouse.json,Mouse,base=homedir

81

(7)

References

[RFC4627 ] Crockford, D., The application/json Media Type for JavaScript Object Notation (JSON), RFC 4627, July 2006.

See Also


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /