Skip to content

Instantly share code, notes, and snippets.

@alces
Created May 2, 2017 13:04
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alces/a3b3b8f83076010a1a01671a0a881a6e to your computer and use it in GitHub Desktop.
Save alces/a3b3b8f83076010a1a01671a0a881a6e to your computer and use it in GitHub Desktop.
Reading YAML from Groovy using snakeyaml (its jar file is available on Maven Central, no dependencies)
import org.yaml.snakeyaml.Yaml
new Yaml().load(new FileReader('path/to/your/yaml/file'))
// and do whatenver your want with the returned map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment