Posting: NimYAML has long been in pure maintenance mode. To reflect this, I have set the version number to 1.0.0 for the most recent release (previous releases used 0.x.y versions).
The single significant feature in this release is that the DOM API has been merged into the serialization API. Previously, you had the option to load your YAML either directly into native types (objects, seqs, strings, etc) or into a YamlDocument which is a descriptive, DOM-like representation of the YAML structure which contains YamlNodes. Now, you can have a YamlNode anywhere in your target type and NimYAML will parse the subgraph at that position into a descriptive YamlNode value. For example:
The use-case for this is when you do not care about certain subgraphs from the YAML input, but do want to keep the contained data. As you can see, NimYAML might not keep the order of mapping keys (due to usage of hash maps), which is conformant to the YAML specification.
The old DOM API is still supported, but carries deprecation warnings from now on. If you want to parse the whole YAML input into a DOM, you can use loadAs[YamlNode](…) now.
Name: NimYAML
Author: flyx
Posting: NimYAML has long been in pure maintenance mode. To reflect this, I have set the version number to
1.0.0
for the most recent release (previous releases used0.x.y
versions).The single significant feature in this release is that the DOM API has been merged into the serialization API. Previously, you had the option to load your YAML either directly into native types (objects, seqs, strings, etc) or into a
YamlDocument
which is a descriptive, DOM-like representation of the YAML structure which containsYamlNode
s. Now, you can have aYamlNode
anywhere in your target type and NimYAML will parse the subgraph at that position into a descriptiveYamlNode
value. For example:This gives
The use-case for this is when you do not care about certain subgraphs from the YAML input, but do want to keep the contained data. As you can see, NimYAML might not keep the order of mapping keys (due to usage of hash maps), which is conformant to the YAML specification.
The old DOM API is still supported, but carries deprecation warnings from now on. If you want to parse the whole YAML input into a DOM, you can use
loadAs[YamlNode](…)
now.