public class YamlSlurper
extends Object
Represents a YAML parser
| Constructor and description |
|---|
YamlSlurper() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Object |
parse(Reader reader)Parse the content of the specified reader into a tree of Nodes. |
|
public Object |
parse(InputStream stream)Parse the content of the specified reader into a tree of Nodes. |
|
public Object |
parse(File file)Parse the content of the specified file into a tree of Nodes. |
|
public Object |
parse(Path path)Parse the content of the specified path into a tree of Nodes. |
<T> |
public T |
parseAs(Class<T> type, Reader reader)Parse YAML from a reader into a typed object. |
<T> |
public T |
parseAs(Class<T> type, InputStream stream)Parse YAML from an input stream into a typed object. |
<T> |
public T |
parseAs(Class<T> type, File file)Parse YAML from a file into a typed object. |
<T> |
public T |
parseAs(Class<T> type, Path path)Parse YAML from a path into a typed object. |
|
public Object |
parseText(String yaml)Parse the content of the specified yaml into a tree of Nodes. |
<T> |
public T |
parseTextAs(Class<T> type, String yaml)Parse the content of the specified YAML text into a typed object using Jackson databinding. |
Parse the content of the specified reader into a tree of Nodes.
reader - the reader of yamlParse the content of the specified reader into a tree of Nodes.
stream - the reader of yamlParse the content of the specified file into a tree of Nodes.
file - the reader of yamlParse the content of the specified path into a tree of Nodes.
path - the reader of yamlParse YAML from a reader into a typed object.
type - the target typereader - the reader of YAMLT - the target typeParse YAML from an input stream into a typed object.
type - the target typestream - the input stream of YAMLT - the target typeParse YAML from a file into a typed object.
type - the target typefile - the YAML fileT - the target typeParse YAML from a path into a typed object.
type - the target typepath - the path to the YAML fileT - the target typeParse the content of the specified yaml into a tree of Nodes.
yaml - the content of yaml Parse the content of the specified YAML text into a typed object using Jackson databinding.
Supports @JsonProperty and @JsonFormat annotations for
property mapping and type conversion.
type - the target typeyaml - the content of YAMLT - the target typeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.