Reputation: 273922
How do I write in YAML a dictionary (map) where one key has the empty string as its value?
Upvotes: 60
Views: 37503
Reputation: 3001
key:
is parsed as null -
%YAML 1.1
---
!!map {
? !!str "key"
: !!null "null",
}
The correct answer is:
key: ""
Upvotes: 80