Skip to main content

$$yaml

Converts an object to YAML format

info

Structure of output may very depending on platform.

Usage​

{ 
"$$yaml": /* undefined */
}
"$$yaml:{input}"

Returns​

string - YAML string

Arguments​

ArgumentTypeValuesRequired / Default ValueDescription
PrimaryobjectYes

Examples​

Input

Definition

Output

{
"title": "TITLE"
}
"$$yaml:$"
title: TITLE

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

{
"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:$$yaml:$"
{
"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"
}
]
}
{
"a": "1",
"b": [
"B",
2
],
"c": true,
"d": {
"e": [
"E",
"800"
]
}
}
{
"$$yaml": "$"
}
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": {
"$$yaml": "$"
}
}
{
"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"
}
]
}