YAML: multiple fields in one line

Viewed 141

How can I write multiple fields in one line Loader=yaml.FullLoader?

Eg. turn this:

field:
   item0: 0
   item1: 1

into this:

field:
  item0:0, item1:1

Or even:

field: {item0:0, item1:1}

Eg. in JSON you could do:

{"field":{ "item0":0, "item1":1 }}

How can you do the same thing in YAML?

0 Answers
Related