klyn.io.toml.TOML.load
method
public static load(reader as TextReader) as SortedMap<String, Object> throws IOException, TOMLParseException:
Description

Loads all remaining TOML text from a reader.

The reader remains owned by the caller and is not closed by this method.

Parameters
ParameterDescription
readerSource text reader.
Returns

Parsed root table.

Throws
  • IOException if the reader fails.
  • TOMLParseException if its content is invalid.
Example
reader = StringReader("port = 8080")
config = TOML.load(reader)
assert config["port"] == 8080l