Yaml

YAML is a recursive acronym for "YAML Ain't Markup Language". YAML is a data serialization language that takes concepts from languages such as XML, C, Python, and Perl, as well as the format for electronic mail as specified by RFC 2822. YAML was first proposed by Clark Evans, and implemented by himself, Brian Ingerson and Oren Ben-Kiki.

Features

YAML was created with the belief that all data can be adequately represented by combinations of lists, hashes, and scalar data. The syntax is relatively straightforward and was designed with human readability in mind, but also to be easily mapped to data types common to most high-level languages:
  • Comments are denoted by the pound sign (#) and continue until the end of the line
  • List members are denoted by a leading hyphen (-) with one member per line, or as comma-separated values enclosed in brackets (& ''')
  • Hashes are represented in the form key: value, either one per line or enclosed in parentheses (( & )) and delimited by commas
  • Scalars may be double-quoted ("), single-quoted ('), or represented by an indented block with optional modifiers to preserve (|) or fold (>) newlines
  • Multiple documents within a single stream are separated by three hyphens (---); three periods (...) optionally end a document within a stream
  • Repeated nodes are initially denoted by an ampersand (&) and thereafter referenced with an asterisk (*)

Examples

Lists

  --- # Favorite movies, block format  - Casablanca  - Spellbound  - Notorious  --- # Shopping list, inline format  bread, eggs 

Hashes

  --- # Block  name: John Smith  age: 33  --- # Inline  (name: John Smith, age: 33) 

Block Literals

Newlines preserved

  --- |    There was a young fellow of Warwick    Who had reason for feeling euphoric        For he could, by election        Have triune erection    Ionic, Corinthian, and Doric 

Newlines folded

  --- >    Wrapped text    will be folded    into a single    paragraph        Blank lines denote    paragraph breaks 

Lists of Hashes

  - (name: John Smith, age: 33)  -    name: Mary Smith    age: 27 

Hashes of Lists

  men: Smith, Bill Jones  women:    - Mary Smith    - Susan Williams 

Implementations

Bindings for YAML exist for the following languages:

External links

 

<< PreviousWord BrowserNext >>
mathematics education
saline river (arkansas)
guan gong
serapion of antioch
irritation
brahmagupta's identity
charles o. finley
hyperbaric oxygen therapy
joshua chamberlain
bobby clarke
recluse spider
mokpo
pohang
anglo french condominium
karl richter
malcolm sargent
american express
giuseppe sinopoli
chuck brown
jinhae
korean national railroad
gunsan
geum river
iksan
thermidorian reaction
trevor pinnock
jeolla
ramsey cardinal
honam
get fuzzy
leonard slatkin
diving suit
erdos cardinal
gyeongbu
power delivery
homework
competitive dance
subtle cardinal
sino korean
n huge cardinal
rpo
concertina wire
mafalda
client privilege