public class YamlParser extends Object
| Constructor and Description |
|---|
YamlParser() |
| Modifier and Type | Method and Description |
|---|---|
static com.fasterxml.jackson.databind.JsonNode |
parseYaml(Path location)
Parse a yaml file into a tree representation.
|
static <T> T |
parseYaml(Path location,
Class<T> clazz,
boolean validate)
Parses a yaml file into a POJO
|
static <T> T |
transformYaml(com.fasterxml.jackson.databind.JsonNode node,
Class<T> clazz,
boolean validate)
Converts a tree into a POJO.
|
public static com.fasterxml.jackson.databind.JsonNode parseYaml(Path location)
location - the location of the filepublic static <T> T transformYaml(com.fasterxml.jackson.databind.JsonNode node,
Class<T> clazz,
boolean validate)
T - the POJO classnode - the tree representationclazz - the POJO classvalidate - true if bean validation should be performedpublic static <T> T parseYaml(Path location, Class<T> clazz, boolean validate)
T - the POJO classlocation - the location of the yaml file to parseclazz - the POJO classvalidate - true if bean validation should be performedCopyright © 2018. All rights reserved.