Save tags with SnakeYAML

I'm trying to translate yaml files to json, but the translation reorders the tags ... Ex, YAML source:

zzzz:
  b: 456
  a: dfff
aa:
  s10: "dddz"
  s3: eeee
bbb:
 - b1
 - a2

      

snakeYAML produces:

{
  "aa": {
    "s3": "eeee",
    "s10":"dddz"
  },
  "bbb":[
    "b1",
    "a2"
  ],
  "zzzz": {
    "a": "dfff",
    "b":456
  }
}

      

+3


source to share





All Articles