-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support Hashable
for json validation
#10324
Conversation
Deploying pydantic-docs with Cloudflare Pages
|
CodSpeed Performance ReportMerging #10324 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add a test for the cases that fail validation from JSON (presumably nested JSON objects/arrays would?). I vaguely recall seeing a version where it would convert arrays to tuples and objects to frozendict; I think we should keep the behavior like this and not do that, but I think it's worth adding a test with a note indicating that it was added to document the current behavior.
Other than that, LGTM
Alternative to #10005 based on #10005 (comment)
Fix #9567
Thanks @kc0506 for the test inspo!