Compare Formats
%YAML 1.2
---
# mapping
firstName: Kim
lastName: Smith
age: 99
old: true
weight: null
address:
street: 21 Jump Street
city: New York
postalCode: '10021'
phoneNumber:
# list of mappings
- type: home
number: 212 555-1234
{
"firstName": "Kim",
"lastName": "Smith",
"age": 99,
"old": true,
"weight": null,
"address": {
"street": "21 Jump Street",
"city": "New York",
"postalCode": "10021"
},
"phoneNumber": [
{
"type": "home",
"number": "212 555-1234"
}
]
}
# Comments!
{
firstName: Kim, # No Quotes!
lastName: Smith,
age: 99,
old: true,
weight: null,
address: {
street: 21 Jump Street,
city: New York,
postalCode: "10021",
},
phoneNumber: [
{
type: home,
number: 212 555-1234,
},
], # Trailing Commas!
}