- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for CustomORJSONResponse (0.06 sec)
-
docs_src/custom_response/tutorial009c_py39.py
from fastapi import FastAPI, Response app = FastAPI() class CustomORJSONResponse(Response): media_type = "application/json" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed" return orjson.dumps(content, option=orjson.OPT_INDENT_2) @app.get("/", response_class=CustomORJSONResponse) async def main():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 451 bytes - Viewed (0)