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
Allow custom json encoder / decoder #714
Comments
as discussed in #599 @pablogamboa suggested allowing a custom JSON encoder / decoder library. This would allow libraries like orjson to be used without making them explicit dependencies of pydantic. The problem here is going to be how to deal with the |
If this requires a breaking change it should be done with the bump to version 1. |
Did you think about implementing something similar to @JrooTJunior done in https://github.com/aiogram/aiogram/blob/dev-2.x/aiogram/utils/json.py? |
I would prefer more like the |
Yes. I want to remove this code from aiogram.
|
@samuelcolvin |
No one has started this. PR very welcome. |
* custom json (d)encoders, fix pydantic#714 * add docs
samuelcolvin commentedAug 5, 2019
makes more sense, perhaps we could have
dump_json
andload_json
attributes ofConfig
which are then used inparse_json()
,json()
andschema_json()
(and anywhere else we use encode/decode json that I've forgotten about).Originally posted by @samuelcolvin in #599 (comment)
The text was updated successfully, but these errors were encountered: