I am trying to modify following type of yaml file, but I have problem when i dump it. Problem is in those quote marks which represent string i guess. I know there is DumperOption to setDefaultScalarStyle, but when i use it with any of Styles used U cant get same style as I have in input yaml file. Am i missing something?
original
parameters:
continent: "Africa"
image: african_set
machines: {
1: "vm1",
2: "vm1" }
routes: {
first: {
1: "21 via 43 dot gi",
2: "43 via 46 dgt ll" },
second: {
1: "61 via 03 d ghji",
2: "83 via 96 t llhh" }
}
protocol: {
"version": "1.94",
"machines": ["m11", "m23"],
"connections": [
{
"name": "t1",
"Type": {
"ID": 01
},
"service": {
"ID": 1,
"net_type": 1
}
}
....
example of using DOUBLE_QUOTE
{
"parameters": {
"continent": "Africa",
"image": "african_set",
"machines": {
!!int "1": "vm1",
!!int "2": "vm2",
!!int "3": "vm3"
},
"routes": {
"first": {
!!int "1": "21 via 43 dot gi",
!!int "2": "43 via 46 dgt ll"
},
"second": {
!!int "1": "61 via 03 d ghji",
!!int "2": "83 via 96 t llhh"
}
},