Project Information
Links
|
YAML 1.1 parser and emitter for Java 5 The art of simplicity is a puzzle of complexity. OverviewYAML is a data serialization format designed for human readability and interaction with scripting languages. SnakeYAML is a YAML parser and emitter for the Java programming language. SnakeYAML features
Info
RequirementsSnakeYAML requires Java 5 or higher. Download and InstallationThe current stable release of SnakeYAML: 1.11. Download links:
Browse 1.10 reports:
Maven 2 configuration: Repository definition (in settings.xml). Releases are available in the central repository. The latest snapshot is only available in the Sonatype repository. Snapshots have production quality. They are published only when they meet all the quality criteria for production (all the tests succeed) <repositories> ... <repository> <id>Sonatype-public</id> <name>SnakeYAML repository</name> <url>oss.sonatype.org/content/groups/public/</url> </repository> ... </repositories> Dependency definition (in pom.xml) <dependencies> ... <dependency> <groupId>org.yaml</groupId> <artifactId>snakeyaml</artifactId> <version>1.12-SNAPSHOT</version> </dependency> ... </dependencies> DocumentationLoading: Yaml yaml = new Yaml(); Object obj = yaml.load("a: 1\nb: 2\nc:\n - aaa\n - bbb"); System.out.println(obj); {b=2, c=[aaa, bbb], a=1} Dumping: 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 SnakeYAML Documentation. Test your YAML documentInstantYAML Development and bug reportsYou may check out the SnakeYAML source code from SnakeYAML Mercurial repository. You may also browse the SnakeYAML source code. If you find a bug in SnakeYAML, please file a bug report. You may review open bugs through the list of open issues. You may discuss SnakeYAML at the mailing list. General info is here. Feel free to improve the documentation. Author and copyrightThe 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. |