@Incubating
public class TomlSlurper
extends Object
Represents a TOML parser
| Constructor and description |
|---|
TomlSlurper() |
| 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 TOML from a reader into a typed object. |
<T> |
public T |
parseAs(Class<T> type, InputStream stream)Parse TOML from an input stream into a typed object. |
<T> |
public T |
parseAs(Class<T> type, File file)Parse TOML from a file into a typed object. |
<T> |
public T |
parseAs(Class<T> type, Path path)Parse TOML from a path into a typed object. |
|
public Object |
parseText(String toml)Parse the content of the specified toml into a tree of Nodes. |
<T> |
public T |
parseTextAs(Class<T> type, String toml)Parse the content of the specified TOML text into a typed object using Jackson databinding. |
Parse the content of the specified reader into a tree of Nodes.
reader - the reader of tomlParse the content of the specified reader into a tree of Nodes.
stream - the reader of tomlParse the content of the specified file into a tree of Nodes.
file - the reader of tomlParse the content of the specified path into a tree of Nodes.
path - the reader of tomlParse TOML from a reader into a typed object.
type - the target typereader - the reader of TOMLT - the target typeParse TOML from an input stream into a typed object.
type - the target typestream - the input stream of TOMLT - the target typeParse TOML from a file into a typed object.
type - the target typefile - the TOML fileT - the target typeParse TOML from a path into a typed object.
type - the target typepath - the path to the TOML fileT - the target typeParse the content of the specified toml into a tree of Nodes.
toml - the content of toml Parse the content of the specified TOML text into a typed object using Jackson databinding.
Supports @JsonProperty and @JsonFormat annotations for
property mapping and type conversion.
type - the target typetoml - the content of TOMLT - the target typeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.