Skip to content

Commit fa1bfcf

Browse files
committed
Add json_response.py comment
1 parent 480ae29 commit fa1bfcf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/mcp/server/auth/json_response.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@
44

55

66
class PydanticJSONResponse(JSONResponse):
7+
# use pydantic json serialization instead of the stock `json.dumps`,
8+
# so that we can handle serializing pydantic models like AnyHttpUrl
79
def render(self, content: Any) -> bytes:
810
return content.model_dump_json(exclude_none=True).encode("utf-8")

0 commit comments

Comments
 (0)