As reported in #218, fkyaml::node string values lack necessary quotes and escapes in serialization.
That could change the semantic equality between an input and an output.
To fix the issue above, the conversion from fkyaml::node string values to the output strings has been modified to check the followings and append quotes and escapes if either is true:
whether the node value can be parsed as non-string token without quotes
whether the node value has one or more characters which must be escaped in a YAML document
To ensure the changes has fixed the issue, unit test cases have also been added for the serializer class.
coverage: 100.0%. remained the same
when pulling 9f0221196c5c698c4f9825a0fff8f3e12163825b on bugfix/218_fix_lacking_quotes_escapes_on_output
into 254d1cd8b35c66efd188c548fde41638311dd9e2 on develop.
As reported in #218,
fkyaml::node
string values lack necessary quotes and escapes in serialization.That could change the semantic equality between an input and an output.
To fix the issue above, the conversion from
fkyaml::node
string values to the output strings has been modified to check the followings and append quotes and escapes if either is true:To ensure the changes has fixed the issue, unit test cases have also been added for the serializer class.