We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm always frustrated when a solution could use a function, but instead relies on creating or modifying classes.
Allow a functional approach to parsing a json, e.g.
@dataclass class Person: name: str person = parse( data=person_json, cls=Person, encoders=dict( name=encode_name ), validators=dict( name=validate_name ) )
An additional benefit is that I can flexibly choose the encoders and validators (they are not baked into my Person data-structure)
person = parse( data=person_json_in_format_a, cls=Person, encoders=format_a_encoders, validators=format_a_validators )
I've looked into various solutions based on Pydantic. I haven't found any nice ones (dataclasses-json looks like it might be the nicest one so far).
No response
The text was updated successfully, but these errors were encountered:
Duplicate of #442
Sorry, something went wrong.
No branches or pull requests
Description
I'm always frustrated when a solution could use a function, but instead relies on creating or modifying classes.
Possible solution
Allow a functional approach to parsing a json, e.g.
An additional benefit is that I can flexibly choose the encoders and validators (they are not baked into my Person data-structure)
Alternatives
I've looked into various solutions based on Pydantic. I haven't found any nice ones (dataclasses-json looks like it might be the nicest one so far).
Context
No response
The text was updated successfully, but these errors were encountered: