toml

Generated by tinox doc

tinox.core.toml, split out of the bundled stdlib as a standalone tinox-central package.

Parse and read

import tinox.core.toml

class Main
{
    fnc main() -> Int32
    {
        let content: String = "name = \"tinox-central\"\nport = 8080\ndebug = true\n"
        let value: TomlValue = Toml::parse(content)
        let table: Map<String, TomlValue> = value.asTable()

        println(table["name"].asString())
        println(table["port"].asInt().toString())
        println(table["debug"].asBool().toString())

        return 0
    }
}

class Toml

Methods

fn parse(content: String) → TomlValue
fn stringify(value: TomlValue) → String

class TomlParser

Methods

fn parse(content: String) → TomlValue
fn parseValue(value: String) → TomlValue

class TomlRenderer

Methods

fn render(value: TomlValue) → String

class TomlValue

Fields

kindString
stringValueString
intValueInt64
floatValueFloat64
boolValueBool
tableValueMap<String, TomlValue>
arrayValueList<TomlValue>

Methods

fn isString() → Bool
fn isInt() → Bool
fn isFloat() → Bool
fn isBool() → Bool
fn isTable() → Bool
fn isArray() → Bool
fn asString() → String
fn asInt() → Int64
fn asFloat() → Float64
fn asBool() → Bool
fn asTable() → Map<String, TomlValue>
fn asArray() → List<TomlValue>