Serde-yaml creates ambiguous YAML during the serialization of keys with string values that could be considered boolean in YAML 1.1. For instance, serializing foo with the string value no results in foo: no. Many YAML 1.2 parsers would still interpret no as boolean due to continued support for 1.1 booleans. I ran into this issue using Python's yaml module:
To avoid YAML created from serde-yaml being misinterpreted by many YAML parsers, string values that may be seen as booleans should be quoted or otherwise disambiguated from YAML 1.1 boolean values.
Serde-yaml creates ambiguous YAML during the serialization of keys with string values that could be considered boolean in YAML 1.1. For instance, serializing
foo
with the string valueno
results infoo: no
. Many YAML 1.2 parsers would still interpretno
as boolean due to continued support for 1.1 booleans. I ran into this issue using Python'syaml
module:To avoid YAML created from serde-yaml being misinterpreted by many YAML parsers, string values that may be seen as booleans should be quoted or otherwise disambiguated from YAML 1.1 boolean values.