Skip to content

Fix case-insensitive boolean deserialization#1619

Merged
scyzoryck merged 1 commit into
schmittjoh:masterfrom
NikoGrano:patch-1
Mar 11, 2026
Merged

Fix case-insensitive boolean deserialization#1619
scyzoryck merged 1 commit into
schmittjoh:masterfrom
NikoGrano:patch-1

Conversation

@NikoGrano

Copy link
Copy Markdown
Contributor

The visitBoolean() method only accepts lowercase "true"/"false" but XML APIs (notably .NET-based services) commonly return "True"/"False". Apply strtolower() before comparison, consistent with how the JSON visitor already handles boolean coercion loosely via (bool) cast.

Q A
Bug fix? yes
New feature? no
Doc updated no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #...
License MIT

@NikoGrano

Copy link
Copy Markdown
Contributor Author

Ping @scyzoryck. This one is quick and simple. 🙏

@scyzoryck

Copy link
Copy Markdown
Collaborator

Hi @NikoGrano ! Can you add an unit test to ensure that we will not miss this feature in the future, please?

The visitBoolean() method only accepts lowercase "true"/"false" but XML APIs (notably .NET-based services) commonly return "True"/"False".
@NikoGrano

Copy link
Copy Markdown
Contributor Author

@scyzoryck Thanks for review. I force pushed with changes to tests and now these edge cases should be covered in future.

@scyzoryck
scyzoryck merged commit d725ebd into schmittjoh:master Mar 11, 2026
25 of 26 checks passed
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