constructNode

fnNode constructNode(T)(const Mark start, const Mark end, const string tag, T value) if((is(T : string) || is(T == Node[]) || is(T == Node.Pair[]))) @safe

Constructs YAML values.

Each YAML scalar, sequence or mapping has a tag specifying its data type. Constructor uses user-specifyable functions to create a node of desired data type from a scalar, sequence or mapping.

Each of these functions is associated with a tag, and can process either a scalar, a sequence, or a mapping. The constructor passes each value to the function with corresponding tag, which then returns the resulting value that can be stored in a node.

If a tag is detected with no known constructor function, it is considered an error.