Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 178 for Wikipedia (0.18 sec)

  1. docs/zh/docs/tutorial/encoder.md

    比如,如果您需要将其存储在数据库中。
    
    对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。
    
    ## 使用`jsonable_encoder`
    
    让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。
    
    例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。
    
    因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。
    
    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    对此你可以使用`jsonable_encoder`。
    
    它接收一个对象,比如Pydantic模型,并会返回一个JSON兼容的版本:
    
    === "Python 3.10+"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Oct 17 05:59:11 GMT 2023
    - 1.7K bytes
    - Viewed (0)
  2. guava/src/com/google/common/collect/ForwardingTable.java

    /**
     * A table which forwards all its method calls to another table. Subclasses should override one or
     * more methods to modify the behavior of the backing map as desired per the <a
     * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
     *
     * @author Gregory Kick
     * @since 7.0
     */
    @GwtCompatible
    @ElementTypesAreNonnullByDefault
    public abstract class ForwardingTable<
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 29 19:42:21 GMT 2021
    - 3.9K bytes
    - Viewed (0)
  3. docs/en/docs/how-to/conditional-openapi.md

    Hiding the documentation just makes it more difficult to understand how to interact with your API, and could make it more difficult for you to debug it in production. It could be considered simply a form of <a href="https://en.wikipedia.org/wiki/Security_through_obscurity" class="external-link" target="_blank">Security through obscurity</a>.
    
    If you want to secure your API, there are several better things you can do, for example:
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/escape/Escaper.java

       *
       * <p>Note that this method may treat input characters differently depending on the specific
       * escaper implementation.
       *
       * <ul>
       *   <li>{@link UnicodeEscaper} handles <a href="http://en.wikipedia.org/wiki/UTF-16">UTF-16</a>
       *       correctly, including surrogate character pairs. If the input is badly formed the escaper
       *       should throw {@link IllegalArgumentException}.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 16:02:17 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/graph/PredecessorsFunction.java

     */
    
    package com.google.common.graph;
    
    import com.google.common.annotations.Beta;
    import com.google.errorprone.annotations.DoNotMock;
    
    /**
     * A functional interface for <a
     * href="https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)">graph</a>-structured data.
     *
     * <p>This interface is meant to be used as the type of a parameter to graph algorithms (such as
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 4.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/graph/SuccessorsFunction.java

     */
    
    package com.google.common.graph;
    
    import com.google.common.annotations.Beta;
    import com.google.errorprone.annotations.DoNotMock;
    
    /**
     * A functional interface for <a
     * href="https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)">graph</a>-structured data.
     *
     * <p>This interface is meant to be used as the type of a parameter to graph algorithms (such as
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Apr 26 17:43:39 GMT 2021
    - 4.3K bytes
    - Viewed (0)
  7. docs/ja/docs/tutorial/encoder.md

    そのために、**FastAPI** は`jsonable_encoder()`関数を提供しています。
    
    ## `jsonable_encoder`の使用
    
    JSON互換のデータのみを受信するデータベース`fase_db`があるとしましょう。
    
    例えば、`datetime`オブジェクトはJSONと互換性がないので、このデーターベースには受け取られません。
    
    そのため、`datetime`オブジェクトは<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO形式</a>のデータを含む`str`に変換されなければなりません。
    
    同様に、このデータベースはPydanticモデル(属性を持つオブジェクト)を受け取らず、`dict`だけを受け取ります。
    
    そのために`jsonable_encoder`を使用することができます。
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Jan 22 20:09:02 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  8. guava/src/com/google/common/cache/ForwardingCache.java

    /**
     * A cache which forwards all its method calls to another cache. Subclasses should override one or
     * more methods to modify the behavior of the backing cache as desired per the <a
     * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
     *
     * @author Charles Fry
     * @since 10.0
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 3.6K bytes
    - Viewed (0)
  9. guava/src/com/google/common/collect/ForwardingMultimap.java

    /**
     * A multimap which forwards all its method calls to another multimap. Subclasses should override
     * one or more methods to modify the behavior of the backing multimap as desired per the <a
     * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
     *
     * <p><b>{@code default} method warning:</b> This class does <i>not</i> forward calls to {@code
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Tue Jun 15 21:08:00 GMT 2021
    - 4.1K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/cache/ForwardingCache.java

    /**
     * A cache which forwards all its method calls to another cache. Subclasses should override one or
     * more methods to modify the behavior of the backing cache as desired per the <a
     * href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
     *
     * @author Charles Fry
     * @since 10.0
     */
    @GwtIncompatible
    @ElementTypesAreNonnullByDefault
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jun 15 18:00:07 GMT 2021
    - 3.6K bytes
    - Viewed (0)
Back to top