writeYaml encodes null with an English specific representation

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      writeYaml encodes null values as "null". That's only legal in English according to [the YAML specification|https://yaml.org/type/null.html,] and some processors like Perl's YAML::Syck don't deal with it well. It would be most portable if the canonical representation was used: "~". Although the empty "" or shorthand "!!null" would probably also be good.

       

      I think this could be fixed by a custom Representer class that sets the nullRepresenter to use "~" instead of "null", although arguably this should be fixed in the RepresentNull class itself. I don't see any utility in using "null" over "~".

            Assignee:
            rsandell
            Reporter:
            Ian Anderson
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: