Skip to content
FutureBlitz

    Install

    Import std.data.toml

    std.data.toml

    Toml: TOML 1.0's documents, read into an Object Value and written from one. A table is an Object, an array an Array, a string a String, an integer an INT, a float a DOUBLE, inf and nan too, and a boolean a Bool. A date, a time, or both, with an offset or local, is a String of its RFC 3339 text, with 'T' between the date and the time, 'Z' for UTC, and its fraction of a second without the 0s at its end, as it's written otherwise. Which tables a document may define, and where, follows TOML 1.0 as tomli reads it. Arrays and inline tables nest 256 deep at most, which is a ParseError past that when read, and a panic when written.

    std/data/toml.fb

    Types

    Toml struct

    Public Struct Toml

    What reads and writes TOML documents, in its Static Methods.

    std/data/toml.fb, line 14

    • Public Static Method Read(text: String): Value Throws ParseError static method #

      The document text holds, as an Object. Throws a ParseError, with its line and column, of UNEXPECTED_END for text that ends inside a string, an array, or an inline table, of OUT_OF_RANGE for an integer an Int64 doesn't hold, and of SYNTAX for the rest that isn't TOML 1.0, and for arrays and inline tables nested more than 256 deep.

    • @PanicsAtCaller Public Static Method Write(value: Value): String static method #

      value, an Object, as a TOML document: each table's keys and values, then its tables, each under its header, an Array of Objects as an array of tables, and an Object in an Array as an inline table. TOML has no null, so an Object's Null is left out. Panics when value isn't an Object, an Array holds a Null, it holds bytes or an integer past an Int64, or its arrays and inline tables nest more than 256 deep.

    Report an issue with this page or with FutureBlitz on GitHub.