Per the YAML spec, Not-a-number is represented as .NAN
https://yaml.org/refcard.html
However, when deserialized with jackson-dataformats-text
's YAMLMapper
, we get:
Malformed numeric value '.NAN'
How do you tell an ObjectMapper
to accept a given string as a representing null without diving into custom deserializers? Or is there a YAML-specific feature I should be enabling?
If you use NULL
, it works on the Jackson side, but then it's no longer valid YAML and schema-aware editors like VS Code know it, which is confusing to end users: