Search code examples
javayamlsnakeyaml

How to get values into an array using SnakeYAML


Say I have:

item:
  field: value
  another: another

Is there any way for me to get it in an array as this form:

[value, another]

Can this be done without much hassle using SnakeYAML in java?


Solution

  • item: [value, another]
    

    or

    item:
      - value
      - another