YAML: dictionary with empty value
-
08-07-2019 - |
Question
How do I write in YAML a dictionary (map) where one key has the empty string as its value?
Solution
key:
is parsed as null -
%YAML 1.1
---
!!map {
? !!str "key"
: !!null "null",
}
The correct answer is:
key: ""
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow