You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of migrating from the build-in json encoder library to the much faster Orjson library, in a rather large project. One of the approaches I've been looking at is to monkey-patch the requests library, so that I don't have to rewrite all the handlers.
This is easier said than done unfortunately. So I'm now looking at httpx, but unfortunately I would still have to monkey-patch the _main and the _models modules.
It would be great if there way a way to specify custom dumps and loads handlers for JSON.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I'm in the process of migrating from the build-in
jsonencoder library to the much fasterOrjsonlibrary, in a rather large project. One of the approaches I've been looking at is to monkey-patch therequestslibrary, so that I don't have to rewrite all the handlers.This is easier said than done unfortunately. So I'm now looking at httpx, but unfortunately I would still have to monkey-patch the
_mainand the_modelsmodules.It would be great if there way a way to specify custom
dumpsandloadshandlers for JSON.For example Pydantic supports this using the json_loads and json_dumps properties in its Config: https://docs.pydantic.dev/usage/exporting_models/#custom-json-deserialisation
All reactions