UJSONResponse
JSON response using the ujson 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 ujson library. This method is used internally to serialize the response body before sending it.
Parameters
| Name | Type | Description |
|---|---|---|
| content | Any | The data to be serialized into JSON. This can be any Python object that ujson can serialize. |
Returns
| Type | Description |
|---|---|
bytes | The content serialized as a UTF-8 encoded JSON byte string. |