class

YamlObj

@Serializable
const abstract class YamlObj : Obj

The base class for objects that represent nodes in a YAML hierarchy. The key information for each node is its tag and content.

See the pod documentation for more information.

methods toStr

Returns write written into a string

val

The node's content value

loc

The text location from which this node was parsed

equals

Two YamlObjs are equal if they have the same type, same tag, and same content

tag

The node's tag

decode

Convenience for schema.decode

write

Transforms the YAML object back into a string, using block style where applicable

hash

Hash is based on tag and content

decode Obj? decode(YamlSchema schema)

Convenience for schema.decode.

equals virtual Bool equals(Obj? that)

Two YamlObjs are equal if they have the same type, same tag, and same content.

hash virtual Int hash()

Hash is based on tag and content

loc FileLoc loc()

The text location from which this node was parsed.

tag Str tag()

The node's tag. Either a specific tag (e.g. tag:yaml.org,2002:str) or the non-specific tag ?.

toStr virtual Str toStr()

Returns write written into a string.

val virtual Obj val()

The node's content value. YamlScalars always have content of type Str, YamlLists with content type YamlObj[], and YamlMaps with YamlObj:YamlObj.

write Void write(OutStream out)

Transforms the YAML object back into a string, using block style where applicable. The result ends with \n and may span multiple lines.

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST