Skip to content
FutureBlitz

    Install

    Import std.data.yaml

    std.data.yaml

    Yaml: YAML 1.2's documents, read into Values by its core schema and written from them. A mapping is an Object, a sequence an Array, and a scalar Null, a Bool, an integer, a Double, or a String as the core schema resolves its plain text, and a String in quotes or a block. A key is its scalar's text, and the keys of a mapping are each its own. An alias is the node its anchor names. Tags are the core schema's: !!str, !!int, !!float, !!bool, !!null, !!seq, !!map, and !, under any handle a %TAG directive gives them; a document with another tag isn't read.

    std/data/yaml.fb

    Types

    Yaml struct

    Public Struct Yaml

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

    std/data/yaml.fb, line 15

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

      The document text holds, or Null for a text of none. An integer past what an Int64 holds is a UINT, and past a UInt64 a Double. Throws a ParseError, with its line and column, of UNEXPECTED_END for text that ends inside a quoted scalar or a flow collection, of OUT_OF_RANGE for an !!int past what a UInt64 holds, of OTHER for a tag that isn't the core schema's, a key that's a mapping or a sequence, or a text of more than one document, which ReadAll reads, at the second's start, and of SYNTAX for the rest that isn't YAML 1.2.

    • Public Static Method ReadAll(text: String): Value[] Throws ParseError static method #

      Each document text holds, in order. Throws a ParseError as Read does, but for more than one document.

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

      value as a document: an Object as a block mapping, an Array as a block sequence, an empty one as {} or [], and a String plain where the core schema reads it back as that String, else in double quotes. Panics when value holds bytes, which the core schema hasn't got.

    • @PanicsAtCaller Public Static Method WriteAll(values: Value[]): String static method #

      values as documents, each after a "---". Panics as Write does.

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