ORJSONResponse
JSON response using the orjson library to serialize data to JSON.
Constructor
Signature
def ORJSONResponse() - > null
Methods
render()
@classmethod
def render(
content: Any
) - > bytes
Serializes the provided content into JSON bytes using the orjson library with support for non-string keys and NumPy arrays.
Parameters
| Name | Type | Description |
|---|---|---|
| content | Any | The Python object to be serialized into JSON format |
Returns
| Type | Description |
|---|---|
bytes | A UTF-8 encoded byte string containing the serialized JSON data |