Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 129 for converties (0.19 sec)

  1. docs/fr/docs/advanced/response-directly.md

    Par exemple, vous ne pouvez pas mettre un modèle Pydantic dans une `JSONResponse` sans d'abord le convertir en un `dict` avec tous les types de données (comme `datetime`, `UUID`, etc.) convertis en types compatibles avec JSON.
    
    Pour ces cas, vous pouvez spécifier un appel à `jsonable_encoder` pour convertir vos données avant de les passer à une réponse :
    
    ```Python hl_lines="6-7  21-22"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/beans/Converter.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.core.beans;
    
    /**
     * 文字列とオブジェクトの変換を行なうインターフェースです。
     *
     * @author higa
     */
    public interface Converter {
    
        /**
         * 値を文字列として返します。
         *
         * @param value
         *            値
         * @return 文字列としての値
         */
        String getAsString(Object value);
    
        /**
         * 値をオブジェクトとして返します。
         *
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  3. src/main/java/org/codelibs/core/beans/util/CopyOptions.java

    import java.util.List;
    import java.util.Map;
    
    import org.codelibs.core.beans.Converter;
    import org.codelibs.core.beans.converter.DateConverter;
    import org.codelibs.core.beans.converter.NumberConverter;
    import org.codelibs.core.beans.converter.SqlDateConverter;
    import org.codelibs.core.beans.converter.TimeConverter;
    import org.codelibs.core.beans.converter.TimestampConverter;
    import org.codelibs.core.convert.DateConversionUtil;
    Java
    - Registered: Fri May 03 20:58:11 GMT 2024
    - Last Modified: Thu Mar 07 01:59:08 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  4. docs/fr/docs/python-types.md

    Vous déclarez la forme de la donnée avec des classes et des attributs.
    
    Chaque attribut possède un type.
    
    Puis vous créez une instance de cette classe avec certaines valeurs et **Pydantic** validera les valeurs, les convertira dans le type adéquat (si c'est nécessaire et possible) et vous donnera un objet avec toute la donnée.
    
    Ainsi, votre éditeur vous offrira un support adapté pour l'objet résultant.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/body-nested-models.md

    Você não conseguiria este tipo de suporte de editor se estivesse trabalhando diretamente com `dict` em vez de modelos Pydantic.
    
    Mas você também não precisa se preocupar com eles, os dicts de entrada são convertidos automaticamente e sua saída é convertida automaticamente para JSON também.
    
    ## Corpos de `dict`s arbitrários
    
    Você também pode declarar um corpo como um `dict` com chaves de algum tipo e valores de outro tipo.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  6. docs/en/docs/advanced/dataclasses.md

        In this case, it's a list of `Item` dataclasses.
    
    6. Here we are returning a dictionary that contains `items` which is a list of dataclasses.
    
        FastAPI is still capable of <abbr title="converting the data to a format that can be transmitted">serializing</abbr> the data to JSON.
    
    7. Here the `response_model` is using a type annotation of a list of `Author` dataclasses.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-updates.md

    * Convert the copied model to something that can be stored in your DB (for example, using the `jsonable_encoder`).
        * This is comparable to using the model's `.model_dump()` method again, but it makes sure (and converts) the values to data types that can be converted to JSON, for example, `datetime` to `str`.
    * Save the data to your DB.
    * Return the updated model.
    
    === "Python 3.10+"
    
        ```Python hl_lines="28-35"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  8. docs/en/docs/tutorial/extra-data-types.md

    * `frozenset`:
        * In requests and responses, treated the same as a `set`:
            * In requests, a list will be read, eliminating duplicates and converting it to a `set`.
            * In responses, the `set` will be converted to a `list`.
            * The generated schema will specify that the `set` values are unique (using JSON Schema's `uniqueItems`).
    * `bytes`:
        * Standard Python `bytes`.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 4.1K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/path-params.md

    {"item_id":3}
    ```
    
    !!! check
        Notice that the value your function received (and returned) is `3`, as a Python `int`, not a string `"3"`.
    
        So, with that type declaration, **FastAPI** gives you automatic request <abbr title="converting the string that comes from an HTTP request into Python data">"parsing"</abbr>.
    
    ## Data validation
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. docs/pt/docs/python-types.md

    * **Verificações de tipo**.
    
    ... e **FastAPI** usa as mesmas declarações para:
    
    * **Definir requisitos**: dos parâmetros do caminho da solicitação, parâmetros da consulta, cabeçalhos, corpos, dependências, etc.
    * **Converter dados**: da solicitação para o tipo necessário.
    * **Validar dados**: provenientes de cada solicitação:
        * A geração de **erros automáticos** retornou ao cliente quando os dados são inválidos.
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.6K bytes
    - Viewed (0)
Back to top