ORJSONResponse
JSON response using the orjson library to serialize data to JSON.
Methods
render()
@classmethod
def render(
content: Any
) - > bytes
Renders the provided content into a JSON byte string using the orjson library. This method is used internally to serialize the response body.
Parameters
| Name | Type | Description |
|---|---|---|
| content | Any | The data to be serialized into JSON. This can be any Python object that orjson can serialize. |
Returns
| Type | Description |
|---|---|
bytes | The content serialized as a JSON byte string. |