dtolnay/serde-yaml

allow yes/no as boolean values

Closed this issue · 1 comments

works:

foo: [true|false]

doesn't work:

foo: [yes|no]
... invalid type: string "yes", expected a boolean at line ...
... invalid type: string "no", expected a boolean at line ...

are you open to support yes and no for boolean values? I'd be open to provide a PR if it's not too difficult to implement.


bit of background: I've been doing lots of work with Ansible, which allows yes and no. with Ansible, I'm even encouraging it by disallowing true and false with yamllint because it usually feels/reads more natural when reading/writing Ansible code.

This is a duplicate of #379.