Skip to content

fix: Can't import from json string when using Optional - #232

Open
webbrain-one wants to merge 1 commit into
abatilo:masterfrom
webbrain-one:webbrain/issue-170
Open

fix: Can't import from json string when using Optional#232
webbrain-one wants to merge 1 commit into
abatilo:masterfrom
webbrain-one:webbrain/issue-170

Conversation

@webbrain-one

Copy link
Copy Markdown

Closes #170

When deserializing JSON, fields typed as Optional[T] failed because the
parser received a dict instead of T or None. Unwrap Optional types to
properly convert JSON dicts to nested dataclasses before validation.

Fixes abatilo#170
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.

Can't import from json string when using Optional

1 participant