Support custom JSON serializers#945
Conversation
f7475ed to
a5cd144
Compare
a5cd144 to
0e2b4cd
Compare
|
I agree with the maintainer's position in the issue that motivated this PR: I don't think this is the API shape that we want to achieve. I agree there's a problem, and I'm happy to engage in a discussion about it. Also, I'm not that sure we should treat JSON deserialization (response) as the same "thing" as JSON serialization. |
Thanks, that makes sense. I agree that request-side JSON serialization and response-side JSON decoding probably should not be treated as the same concern. I’m going to rework the PR into a smaller proposal focused only on configurable response JSON decoding, with a reduced API surface and semantics closer to the original issue discussion. |
|
I think it's better if you can create a discussion first with the proposal, so we can discuss in there. Would that okay for you? |
Yes, okay. |
Adds per-client and per-request JSON serializer and deserializer hooks so callers can use libraries such as orjson. This keeps the existing default JSON behavior unchanged while allowing request bodies and response decoding to be customized independently.
Closes #259.