dtolnay / serde-yaml

Strongly typed YAML library for Rust
Apache License 2.0
964 stars 164 forks source link

allow yes/no as boolean values #384

Closed wookietreiber closed 1 year ago

wookietreiber commented 1 year ago

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.

dtolnay commented 1 year ago

This is a duplicate of #379.