-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly quote all possible booleans. #53
Comments
Thanks for catching this. We would love a PR to fix this! |
It would be great if these (previously) valid boolean values ("YES", for example) are always quoted anyway to assure the other side will always decode it as a string. Leaving them quoted is harmless for version 1.2, and means version 1.1 validations aren't broken unnecessarily. |
@hoodie For me that would do it perfectly! Once that issue lands, my problem would be solved. For now we solved it by actually changing the consumer code, which luckily was in our reach. |
Yes, that seems to be the correct fix. Sorry for writing so unclear issue :-) |
Currently, the library incorrectly doesn't add quotes to strings, which will be interpreted as booleans:
yaml-rust/src/emitter.rs
Lines 270 to 271 in bbe0696
Specs describes many other possiblities:
http://yaml.org/type/bool.html
Personally, I encounter this bug with string
TRUE
in https://github.com/InQuicker/ktmpl/ which produced such value without qutes and kubernetes doesn't accept that value.The text was updated successfully, but these errors were encountered: