Commit Graph

2 Commits

Author SHA1 Message Date
Yurii Motov 6706439b69 Update test to reflect latest changes on master 2026-01-26 19:49:32 +01:00
Eugene Toder 3e3a4023bc Add PydanticJSONResponse
When using this response class, json serialization is done using
Pydantic's built-in json serialization (`dump_json(r)`) instead of
generating an intermediate dict that is later serialized using a json
library (`json.dumps(dump_python(r))`).

In my testing this is 3-4x faster than using the standard json library
(the default) and 50% faster than using orjson, without requiring any
extra dependencies. This also allows configuring serialization behavior
per model using Pydantic's model_config.
2025-12-14 12:29:30 -05:00