Skip to content
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

Add support for parsing bools, #18

Closed
wants to merge 1 commit into from
Closed

Add support for parsing bools, #18

wants to merge 1 commit into from

Conversation

jonathanmorley
Copy link

this breaks the current behaviour of any attribute resolving to true

@RReverser
Copy link
Owner

Yeah, as you mentioned, this is a breaking change (it breaks even our use cases which I created this library for in the first place), and I don't think there's strong enough motivation to do it.

Unfortunately, there's too many ways to represent booleans in string form - some use 0/1, some absence/presence of attributes, some literals true/false (and then, they can be either case-sensitive or not), and there are many others. We will never be able to cover each case.

I think the existing way to represent bools is as good/bad as any other, and breaking compatibility here doesn't bring any obvious advantage, so it's better to leave it as is and have consumers with different needs make deserialization in their own way.

Also, you might want to track serde-rs/serde#745 which sounds like should fix this issue in a more generic way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants