YAML - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


YAML (.yml, .yaml) File Format

YAML file format

 

Description

Examples

References

Description

• 

YAML (YAML Ain't Markup Language) is a lightweight text-based data standard for describing structured data.

• 

As a human-readable format, it offers an alternative to explicitly tagged structured data such as XML. The JSON format is a subset of YAML 1.2.

• 

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

• 

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

Examples

Parse a YAML string as an expression.

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

1,2,3.265,6.01,7.373

(1)

Import data from a file in YAML format.

Importexample/address.yaml,base=datadir

tableaddress=tablecountry=Canada,province=ON,city=Waterloo,streetAddress=615 Kumpf Drive,postalCode=N2V 1K8,founded=1988,companyName=Maplesoft,phoneNumbers=tabletype=local,number=+1 (519) 747-2373,tabletype=toll-free,number=+1 (800) 267-6583,tabletype=fax,number=+1 (519) 747-5284

(2)

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

MousetableGenus=Mus,Species=musculus

MousetableGenus=Mus,Species=musculus

(3)

MouseFamilyMuridae

MouseFamilyMuridae

(4)

MouseOrderRodentia

MouseOrderRodentia

(5)

MouseClassMammalia

MouseClassMammalia

(6)

Exportmouse.yaml,Mouse,base=homedir

80

(7)

References

  

YAML 1.2 Language Specification, http://www.yaml.org/spec/1.2/spec.html, yaml.org.

See Also

Formats

Formats,JSON