Skip to main content

UJSONResponse

JSON response using the ujson library to serialize data to JSON.

Methods


render()

@classmethod
def render(
content: Any
) - > bytes

Serializes the provided content into JSON bytes using the ujson library with UTF-8 encoding.

Parameters

NameTypeDescription
contentAnyThe Python object to be serialized into a JSON-formatted byte string.

Returns

TypeDescription
bytesThe UTF-8 encoded byte string representing the serialized JSON data.