Node.this

Construct a Node from a value.

Any type except for Node can be stored in a Node, but default YAML types (integers, floats, strings, timestamps, etc.) will be stored more efficiently. To create a node representing a null value, construct it from YAMLNull.

More...
  1. this(T value, string tag)
  2. this(T value, string tag)
    struct Node
    @trusted pure nothrow
    this
    (
    T
    )
    (,
    const string tag = null
    )
  3. this(T[] array, string tag)
  4. this(V[K] array, string tag)
  5. this(K[] keys, V[] values, string tag)

Parameters

tag string

Overrides tag of the node when emitted, regardless of tag determined by Representer. Representer uses this to determine YAML data type when a D data type maps to multiple different YAML data types. Tag must be in full form, e.g. "tag:yaml.org,2002:int", not a shortcut, like "!!int".

Detailed Description

Note that to emit any non-default types you store in a node, you need a Representer to represent them in YAML - otherwise emitting will fail.

Meta