Key-value _pairs of the mapping.
Style of the mapping. If invalid, default _style will be used. If the node was loaded before, previous _style will always be used.
The represented node.
RepresenterException if a child could not be represented.
struct MyStruct { int x, y, z; //Any D:YAML type must have a custom opCmp operator. //This is used for ordering in mappings. const int opCmp(ref const MyStruct s) { if(x != s.x){return x - s.x;} if(y != s.y){return y - s.y;} if(z != s.z){return z - s.z;} return 0; } } Node representMyStruct(ref Node node, Representer representer) { auto value = node.as!MyStruct; auto pairs = [Node.Pair("x", value.x), Node.Pair("y", value.y), Node.Pair("z", value.z)]; return representer.representMapping("!mystruct.tag", pairs); }
Represent a mapping with specified _tag, representing children first.
This is used by representer functions that produce mappings.