[Java] Class YamlSlurper
- groovy.yaml.YamlSlurper
public class YamlSlurper
Represents a YAML parser
- Since:
- 3.0.0
Constructor Summary
| Constructor and description | 
|---|
| YamlSlurper
                                () | 
Methods Summary
| 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. | |
| public Object | parseText(String yaml)Parse the content of the specified yaml into a tree of Nodes. | 
Inherited Methods Summary
| Methods inherited from class | Name | 
|---|---|
| class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll | 
Constructor Detail
public YamlSlurper()
Method Detail
public Object parse(Reader reader)
Parse the content of the specified reader into a tree of Nodes.
- Parameters:
- 
reader- the reader of yaml
- Returns:
- the root node of the parsed tree of Nodes
public Object parse(InputStream stream)
Parse the content of the specified reader into a tree of Nodes.
- Parameters:
- 
stream- the reader of yaml
- Returns:
- the root node of the parsed tree of Nodes
public Object parse(File file)
Parse the content of the specified file into a tree of Nodes.
- Parameters:
- 
file- the reader of yaml
- Returns:
- the root node of the parsed tree of Nodes
public Object parse(Path path)
Parse the content of the specified path into a tree of Nodes.
- Parameters:
- 
path- the reader of yaml
- Returns:
- the root node of the parsed tree of Nodes
public Object parseText(String yaml)
Parse the content of the specified yaml into a tree of Nodes.
- Parameters:
- 
yaml- the content of yaml
- Returns:
- the root node of the parsed tree of Nodes
    © 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
    https://docs.groovy-lang.org/3.0.7/html/gapi/groovy/yaml/YamlSlurper.html