Skip to content
Tina Müller (tinita) edited this page Sep 18, 2022 · 7 revisions

Changes in version 1.2 (revision 1.2.0) (2009-07-21)

From https://yaml.org/spec/1.2.2/ext/changes/

The next-line \x85, line-separator \u2028 and paragraph-separator \u2029 characters are no longer considered line-break characters. Within scalar values, this means that next-line characters will not be included in the white-space normalization. Using any of these outside scalar values is likely to result in errors during parsing. For a relatively robust solution, try replacing \x85 and \u2028 with \n and \u2029 with \n\n.

libyaml still considers those characters as line breaks.

% perl -wE'binmode STDOUT, "encoding(utF-8)";print "- line1\x{2028}- line2\x{2029}- line3\x{85}- line4\n";' >file.yaml

% yamlpp-load file.yaml -M YAML::PP::LibYAML
$doc0 = [
          "line1",
          "line2",
          "line3",
          "line4"
        ];
% yamlpp-load file.yaml -M YAML::PP
$doc0 = [
          "line1\x{2028}- line2\x{2029}- line3\x{85}- line4"
        ];

  1. Tag shorthands can no longer include any of the characters ,[]{}, but can include #. To work around this, either fix your tag names or use verbatim tags.
  2. Anchors can no longer include any of the characters ,[]{}.
  3. Inside double-quoted strings / is now a valid escape for the / character.
  4. No space is required after the colon in flow style if the key is quoted, e.g. {"key":value}.
  5. The maximum key length of 1024 characters has been removed for flow mapping keys.
  6. Quoted content can include practically all Unicode characters.
  7. Documents in streams are now independent of each other, and no longer inherit preceding document directives if they do not define their own.
  8. Explicit document-end marker is now always required before a directive.
Clone this wiki locally