Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for UJSONResponse (0.33 sec)

  1. docs_src/custom_response/tutorial001_py39.py

    from fastapi import FastAPI
    from fastapi.responses import UJSONResponse
    
    app = FastAPI()
    
    
    @app.get("/items/", response_class=UJSONResponse)
    async def read_items():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 197 bytes
    - Viewed (0)
  2. fastapi/responses.py

        import ujson
    except ImportError:  # pragma: nocover
        ujson = None  # type: ignore
    
    
    try:
        import orjson
    except ImportError:  # pragma: nocover
        orjson = None  # type: ignore
    
    
    class UJSONResponse(JSONResponse):
        """
        JSON response using the high-performance ujson library to serialize data to JSON.
    
        Read more about it in the
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  3. docs/en/docs/reference/responses.md

        ORJSONResponse,
        PlainTextResponse,
        RedirectResponse,
        Response,
        StreamingResponse,
        UJSONResponse,
    )
    ```
    
    ## FastAPI Responses
    
    There are a couple of custom FastAPI response classes, you can use them to optimize JSON performance.
    
    ::: fastapi.responses.UJSONResponse
        options:
            members:
                - charset
                - status_code
                - media_type
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  4. docs/zh/docs/advanced/custom-response.md

    如上文所述,这是 **FastAPI** 中使用的默认响应。
    
    ### `ORJSONResponse`
    
    如上文所述,`ORJSONResponse` 是一个使用 <a href="https://github.com/ijl/orjson" class="external-link" target="_blank">`orjson`</a> 的快速的可选 JSON 响应。
    
    
    ### `UJSONResponse`
    
    `UJSONResponse` 是一个使用 <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a> 的可选 JSON 响应。
    
    /// warning | 警告
    
    在处理某些边缘情况时,`ujson` 不如 Python 的内置实现那么谨慎。
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  5. docs/ru/docs/advanced/custom-response.md

    /// info | Информация
    
    Требуется установка `orjson`, например командой `pip install orjson`.
    
    ///
    
    ### `UJSONResponse` { #ujsonresponse }
    
    Альтернативная реализация JSON-ответа с использованием <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a>.
    
    /// info | Информация
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 19.7K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/custom-response.md

    /// info
    
    This requires installing `orjson` for example with `pip install orjson`.
    
    ///
    
    ### `UJSONResponse` { #ujsonresponse }
    
    An alternative JSON response using <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a>.
    
    /// info
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 12.4K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/custom-response.md

    /// info | Info
    
    Dazu muss `orjson` installiert werden, z. B. mit `pip install orjson`.
    
    ///
    
    ### `UJSONResponse` { #ujsonresponse }
    
    Eine alternative JSON-Response mit <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a>.
    
    /// info | Info
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 14.4K bytes
    - Viewed (0)
  8. docs/es/docs/advanced/custom-response.md

    /// info | Información
    
    Esto requiere instalar `orjson`, por ejemplo, con `pip install orjson`.
    
    ///
    
    ### `UJSONResponse` { #ujsonresponse }
    
    Un response JSON alternativo usando <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a>.
    
    /// info | Información
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.2K bytes
    - Viewed (0)
  9. docs/pt/docs/advanced/custom-response.md

    /// info | Informação
    
    Essa resposta requer a instalação do pacote `orjson`, com o comando `pip install orjson`, por exemplo.
    
    ///
    
    ### `UJSONResponse` { #ujsonresponse }
    
    Uma alternativa de resposta JSON utilizando a biblioteca <a href="https://github.com/ultrajson/ultrajson" class="external-link" target="_blank">`ujson`</a>.
    
    /// info | Informação
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 13.8K bytes
    - Viewed (0)
  10. docs/ja/docs/advanced/custom-response.md

    しかし、*path operationデコレータ* に、使いたい `Response` を宣言することもできます。
    
    *path operation関数* から返されるコンテンツは、その `Response` に含まれます。
    
    そしてもし、`Response` が、`JSONResponse` や `UJSONResponse` の場合のようにJSONメディアタイプ (`application/json`) ならば、データは *path operationデコレータ* に宣言したPydantic `response_model` により自動的に変換 (もしくはフィルタ) されます。
    
    /// note | 備考
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top