| from rest_framework.parsers import JSONParserfrom rest_framework.renderers import JSONRendererclass TextJSONRenderer(JSONRenderer):    """支持 text/json 的响应渲染器"""    media_type = 'text/json'  # 覆盖默认值    format = 'json'  # 保持默认格式class TextJSONParser(JSONParser):    """支持 text/json 的解析器"""    media_type = 'text/json'  
 |