dyaml.serializer

YAML serializer. Code based on PyYAML: http://www.pyyaml.org

struct Serializer

Types 1

Serializes represented YAML nodes, generating events which are then emitted by Emitter.

Fields
Resolver resolver_Resolver used to determine which tags are automaticaly resolvable.
Flag!"explicitStart" explicitStart_Do all document starts have to be specified explicitly?
Flag!"explicitEnd" explicitEnd_Do all document ends have to be specified explicitly?
string YAMLVersion_YAML version string.
TagDirective[] tagDirectives_Tag directives to emit.
string[Node] anchors_Nodes with assigned anchors.
bool[Node] serializedNodes_Nodes with assigned anchors that are already serialized.
uint lastAnchorID_ID of the last anchor generated.
Methods
void startStream(EmitterT)(ref EmitterT emitter) @safeBegin the stream.
void endStream(EmitterT)(ref EmitterT emitter) @safeEnd the stream.
void serialize(EmitterT)(ref EmitterT emitter, ref Node node) @safeSerialize a node, emitting it in the process.
bool anchorable(ref Node node) @safeDetermine if it's a good idea to add an anchor to a node.
void anchorNode(ref Node node) @safeAdd an anchor to the node if it's anchorable and not anchored yet.
string generateAnchor() @safeGenerate and return a new anchor.
void serializeNode(EmitterT)(ref EmitterT emitter, ref Node node) @safeSerialize a node and all its subnodes.
Constructors
this(Resolver resolver, const Flag!"explicitStart" explicitStart, const Flag!"explicitEnd" explicitEnd, string YAMLVersion, TagDirective[] tagDirectives)Construct a Serializer.