Dumper.tagDirectives

Specify tag directives.

A tag directive specifies a shorthand notation for specifying _tags. Each tag directive associates a handle with a prefix. This allows for compact tag notation.

Each handle specified MUST start and end with a '!' character (a single character "!" handle is allowed as well).

Only alphanumeric characters, '-', and '__' may be used in handles.

Each prefix MUST not be empty.

The "!!" handle is used for default YAML _tags with prefix "tag:yaml.org,2002:". This can be overridden.

struct Dumper
@property pure @safe
void
tagDirectives
(
string[string] tags
)

Examples

auto dumper = dumper();
string[string] directives;
directives["!short!"] = "tag:long.org,2011:";
//This will emit tags starting with "tag:long.org,2011"
//with a "!short!" prefix instead.
dumper.tagDirectives(directives);
dumper.dump(new Appender!string(), Node("foo"));

Meta