YAML: dictionary with empty value
DictionaryMapYamlDictionary Problem Overview
How do I write in YAML a dictionary (map) where one key has the empty string as its value?
Dictionary Solutions
Solution 1 - Dictionary
key:
is parsed as null -
%YAML 1.1
---
!!map {
? !!str "key"
: !!null "null",
}
The correct answer is:
key: ""