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.
-
The document
textholds, 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 fortextthat 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. -
Each document
textholds, in order. Throws a ParseError as Read does, but for more than one document. -
valueas 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 whenvalueholds bytes, which the core schema hasn't got. -
valuesas documents, each after a "---". Panics as Write does.
Report an issue with this page or with FutureBlitz on GitHub.