version Function
Manage YAML directive value which defines the version of the YAML specification. This parser supports YAML 1.2, but it can parse most of YAML 1.1 and YAML 1.0
This function allows controlling the version management. For instance, if the document contains an old version, the parser can be adapted to compensate for the problem. Or it can fail to indicate that the incoming version is not supported.
By default, 1.* version are accepted and treated as YAML 1.2. Other versions fail to parse (YamlVersionException is thrown).