Yaml - Mapping (Map)

Yaml Representation

About

A map in yaml

Syntax

hr:  65    # Home runs
avg: 0.278 # Batting average
rbi: 147   # Runs Batted In
{
    hr: 65,
    avg: 0.278, rbi: 147
}

Example

hr:  65    # Home runs
avg: 0.278 # Batting average
rbi: 147   # Runs Batted In
Mark McGwire: {hr: 65, avg: 0.278}
Sammy Sosa: {
    hr: 63,
    avg: 0.288
}
american:
  - Boston Red Sox
  - Detroit Tigers
  - New York Yankees
national:
  - New York Mets
  - Chicago Cubs
  - Atlanta Braves





Discover More
Card Puncher Data Processing
Ansible - Dict (Map)

value type of a variable The map variable in ansible is based on the python dict. See example:
Yaml Representation
How to read a Yaml File and write it in indentation or Json format with SnakeYaml ?

SnakeYaml is a java library that manages yaml document. Object to read or write must be: a java bean (ie getter and setter + public properties) a LinkedList a HashMap Log file: With SnakeYaml,...
Yaml Representation
YAML Ain’t Markup Language (YAML)

YAML minimizes the amount of structural characters in order to view and understand more easily the data. For example: indentation may be used for structure, colons separate key: value pairs, ...
Yaml Representation
Yaml - Sequence

A sequence in Yaml One sequence of scalar Scalar with sequence value (Indentation style) Sequence of Sequences (flow style) Sequence of mapping



Share this page:
Follow us:
Task Runner