About
Articles Related
Syntax
hr: 65 # Home runs
avg: 0.278 # Batting average
rbi: 147 # Runs Batted In
{
hr: 65,
avg: 0.278, rbi: 147
}
Example
- Mapping Scalars to Scalars (Indentation style)
hr: 65 # Home runs
avg: 0.278 # Batting average
rbi: 147 # Runs Batted In
- Mapping of mapping (Flow style)
Mark McGwire: {hr: 65, avg: 0.278}
Sammy Sosa: {
hr: 63,
avg: 0.288
}
- Mapping Scalars to Sequences (List) (Indentation style)
american:
- Boston Red Sox
- Detroit Tigers
- New York Yankees
national:
- New York Mets
- Chicago Cubs
- Atlanta Braves