Wiki
Clone wikisnakeyaml / Home
Welcome
YAML 1.1 parser and emitter for Java.
Requirements
SnakeYAML requires Java 7 or higher (The latest version built for Java 6 is 1.23).
SnakeYAML does not depend on any external library (but the tests do).
Info
- Changes
- Installation
- Documentation
- CVE and NIST
- Frequently Asked Questions
- How to for common tasks
- Compact Object Notation
- Android support
- From Hg to GIT
- YAML 1.2 support
- Billion laughs attack (same as CVE)
- Variable substitution
- OSS FUZZ setup
Quick start
Loading (de-serialize):
LoaderOptions options = new LoaderOptions(); Yaml yaml = new Yaml(options); Object obj = yaml.load("a: 1\nb: 2\nc:\n - aaa\n - bbb"); System.out.println(obj); {b=2, c=[aaa, bbb], a=1}
Map<String, String> map = new HashMap<String, String>(); map.put("name", "Pushkin"); Yaml yaml = new Yaml(); String output = yaml.dump(map); System.out.println(output); --- name: Pushkin
For more details, please check Documentation
Contribute
- GIT is used to dance with the source code.
- If you find a bug in SnakeYAML, please file a bug report.
- You may discuss SnakeYAML at the mailing list.
- Release process
- How to generate PGP signature
- How to test with different JDKs
Author and copyright
The SnakeYAML library is developed by the team of developers and it is based on PyYAML module written by Kirill Simonov.
SnakeYAML is released under the Apache 2.0 license.
Have fun!
Updated