Skip to main content

$$yamlparse

Parses a YAML format to object

Usage​

{ 
"$$yamlparse": /* YAML string */
}
"$$yamlparse:{input}"

Returns​

object

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimarystringYesYAML string

Examples​

Input

Definition

Output

title: TITLE

"$$yamlparse:$"
{
"title": "TITLE"
}
root:
title: TITLE

"$$yamlparse:$"
{
"root": {
"title": "TITLE"
}
}
a: '1'
b:
- B
- 2
c: true
d:
e:
- E
- '800'

"$$yamlparse:$"
{
"a": "1",
"b": [
"B",
2
],
"c": true,
"d": {
"e": [
"E",
"800"
]
}
}
title: Mr.
firstName: Sam
lastName: Anton
address:
flatNumber: BV-1025
buildingName: Shivaji
plotNumber: '1093'
sector: Sector 19
city: Bengaluru
state: Karnataka
country: India
nodeName: South Bengaluru
items:
- itemName: Television
itemBoughtYear: '2014'
- itemName: Washing Machine
itemBoughtYear: '2020'
- itemName: Refrigerator
itemBoughtYear: '2011'
- itemName: Grinder
itemBoughtYear: '2012'
- itemName: Computer
itemBoughtYear: '2010'

"$$yamlparse:$"
{
"title": "Mr.",
"firstName": "Sam",
"lastName": "Anton",
"address": {
"flatNumber": "BV-1025",
"buildingName": "Shivaji",
"plotNumber": "1093",
"sector": "Sector 19",
"city": "Bengaluru",
"state": "Karnataka",
"country": "India",
"nodeName": "South Bengaluru"
},
"items": [
{
"itemName": "Television",
"itemBoughtYear": "2014"
},
{
"itemName": "Washing Machine",
"itemBoughtYear": "2020"
},
{
"itemName": "Refrigerator",
"itemBoughtYear": "2011"
},
{
"itemName": "Grinder",
"itemBoughtYear": "2012"
},
{
"itemName": "Computer",
"itemBoughtYear": "2010"
}
]
}
title: Mr.
firstName: Sam
lastName: Anton
address:
flatNumber: BV-1025
buildingName: Shivaji
plotNumber: '1093'
sector: Sector 19
city: Bengaluru
state: Karnataka
country: India
nodeName: South Bengaluru
items:
- itemName: Television
itemBoughtYear: '2014'
- itemName: Washing Machine
itemBoughtYear: '2020'
- itemName: Refrigerator
itemBoughtYear: '2011'
- itemName: Grinder
itemBoughtYear: '2012'
- itemName: Computer
itemBoughtYear: '2010'

{
"$$yamlparse": "$"
}
{
"title": "Mr.",
"firstName": "Sam",
"lastName": "Anton",
"address": {
"flatNumber": "BV-1025",
"buildingName": "Shivaji",
"plotNumber": "1093",
"sector": "Sector 19",
"city": "Bengaluru",
"state": "Karnataka",
"country": "India",
"nodeName": "South Bengaluru"
},
"items": [
{
"itemName": "Television",
"itemBoughtYear": "2014"
},
{
"itemName": "Washing Machine",
"itemBoughtYear": "2020"
},
{
"itemName": "Refrigerator",
"itemBoughtYear": "2011"
},
{
"itemName": "Grinder",
"itemBoughtYear": "2012"
},
{
"itemName": "Computer",
"itemBoughtYear": "2010"
}
]
}