Search code examples
javaandroidyamlsnakeyaml

Creating Custom YAML file using SnakeYAML or Jackson


I am trying to generate a YAML file in this format using Java on an Android app:

testConfig: [
  {test1: "example1", test2: "example2"},
  {test3: "example3", test4: "example4"},
]

How can I make this programmatically using either SnakeYAML or Jackson using Java on Android?

Thanks!


Solution

  • Solution - I just formatted a YAML file with Strings and therefore didn't need SnakeYAML or Jackson.