-
-
Notifications
You must be signed in to change notification settings - Fork 152
Open
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend
Description
In Yaml spec, if one property is the prefix of another, a value can be attributed to the parent one using ~ as a null key to represent any YAML property that is a prefix of another one.
The following test is failing:
public void testTildeIsDeserializedAsNullKey() throws Exception
{
final String YAML =
"quarkus:\n" +
" log:\n" +
" sentry:\n" +
" ~: true\n" +
" dsn: 'some string'";
JsonNode node = MAPPER.readValue(YAML, JsonNode.class);
assertTrue(node.get("quarkus").get("log").get("sentry").booleanValue());
}
instead, the following statement is true:
assertTrue(node.get("quarkus").get("log").get("sentry").get("~").booleanValue())
quarkus.log.sentry."~" is true instead of quarkus.log.sentry
Relevant conversation:
https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/yaml.20property.20conflict
Relevant spec:
https://quarkus.io/guides/config-yaml#configuration-property-conflicts
Metadata
Metadata
Assignees
Labels
yamlIssue related to YAML format backendIssue related to YAML format backend