-
-
Notifications
You must be signed in to change notification settings - Fork 152
Closed
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend
Milestone
Description
https://github.com/FasterXML/jackson-dataformat-yaml/blob/master/src/main/java/com/fasterxml/jackson/dataformat/yaml/YAMLGenerator.java specifies that YAML keys will always be written with STYLE_NAME, e.g. without quotes.
// for field names, leave out quotes
private final static Character STYLE_NAME = null;
...
private final void _writeFieldName(String name)
throws IOException
{
_writeScalar(name, "string", STYLE_NAME);
}But this breaks parsers when you write a map with a key that is a reserved word in YAML, e.g. no. If _writeFieldName() encounters a field that is one of { y, true, yes, on, n, false, no, off }, it should use STYLE_QUOTED.
Actual definition of such boolean values can be found here:
Metadata
Metadata
Assignees
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend