Permalink
Browse files

Update README.asciidoc (#613)

Adjust code snippet to current versions of things
  • Loading branch information...
1 parent d3d5eba commit 3be54003f0e14ee8309868d520476b7c627ef950 @pilhuhn pilhuhn committed with gastaldi Aug 10, 2017
Showing with 3 additions and 2 deletions.
  1. +3 −2 parser-yaml/README.asciidoc
@@ -32,13 +32,14 @@ To use this addon, you must add it as a dependency in the *pom.xml* of your `for
</dependency>
----
== Features
-YAMLResource for YAML files::
+YamlResource for YAML files::
Allows easy manipulation of YAML data
+
[source,java]
----
@Inject private ResourceFactory factory;
-YAMLResource resource = factory.createResource(new File("data.yaml")).reify(YAMLResource.class);
+File file = new File("data.yaml"); // File must exist
+YamlResource resource = factory.create(file).reify(YamlResource.class);
Map<String,Object> model = resource.getModel().get();
// Manipulate model
...

0 comments on commit 3be5400

Please sign in to comment.