Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 127 for wiki (0.04 seconds)

  1. docs/ko/docs/tutorial/encoder.md

    JSON 호환 가능 데이터만 수신하는 `fake_db` 데이터베이스가 존재한다고 가정하겠습니다.
    
    예를 들면, `datetime` 객체는 JSON과 호환되지 않으므로 이 데이터베이스는 이를 받지 않습니다.
    
    따라서 `datetime` 객체는 [ISO 형식](https://en.wikipedia.org/wiki/ISO_8601)의 데이터를 포함하는 `str`로 변환되어야 합니다.
    
    같은 방식으로 이 데이터베이스는 Pydantic 모델(속성이 있는 객체)을 받지 않고, `dict`만을 받습니다.
    
    이를 위해 `jsonable_encoder`를 사용할 수 있습니다.
    
    Pydantic 모델 같은 객체를 받고 JSON 호환 가능한 버전을 반환합니다:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  2. docs/zh-hant/docs/tutorial/encoder.md

    ## 使用 `jsonable_encoder` { #using-the-jsonable-encoder }
    
    想像你有一個只接受與 JSON 相容資料的資料庫 `fake_db`。
    
    例如,它不接受 `datetime` 物件,因為那與 JSON 不相容。
    
    因此,必須將 `datetime` 物件轉為一個以 [ISO 格式](https://en.wikipedia.org/wiki/ISO_8601) 表示資料的 `str`。
    
    同樣地,這個資料庫不會接受 Pydantic 模型(帶有屬性的物件),只接受 `dict`。
    
    你可以使用 `jsonable_encoder` 來處理。
    
    它接收一個物件(例如 Pydantic 模型),並回傳一個與 JSON 相容的版本:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  3. docs/zh/docs/tutorial/encoder.md

    ## 使用`jsonable_encoder` { #using-the-jsonable-encoder }
    
    让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。
    
    例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。
    
    因此,`datetime`对象必须转换为包含[ISO 格式](https://en.wikipedia.org/wiki/ISO_8601)的`str`类型对象。
    
    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    对此你可以使用`jsonable_encoder`。
    
    它接收一个对象,比如Pydantic模型,并会返回一个JSON兼容的版本:
    
    {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *}
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 1.5K bytes
    - Click Count (0)
  4. docs/ja/docs/tutorial/encoder.md

    ## `jsonable_encoder`の使用 { #using-the-jsonable-encoder }
    
    JSON互換のデータのみを受信するデータベース`fake_db`があるとしましょう。
    
    例えば、`datetime`オブジェクトはJSONと互換性がないので、受け取られません。
    
    そのため、`datetime`オブジェクトは[ISO形式](https://en.wikipedia.org/wiki/ISO_8601)のデータを含む`str`に変換されなければなりません。
    
    同様に、このデータベースはPydanticモデル(属性を持つオブジェクト)を受け取らず、`dict`だけを受け取ります。
    
    そのために`jsonable_encoder`を使用することができます。
    
    Pydanticモデルのようなオブジェクトを受け取り、JSON互換版を返します:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:07:17 GMT 2026
    - 1.8K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/base/Suppliers.java

      }
    
      /**
       * Returns a supplier which caches the instance retrieved during the first call to {@code get()}
       * and returns that value on subsequent calls to {@code get()}. See: <a
       * href="http://en.wikipedia.org/wiki/Memoization">memoization</a>
       *
       * <p>The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 31 21:24:28 GMT 2026
    - 16.1K bytes
    - Click Count (0)
  6. guava/src/com/google/common/base/Suppliers.java

      }
    
      /**
       * Returns a supplier which caches the instance retrieved during the first call to {@code get()}
       * and returns that value on subsequent calls to {@code get()}. See: <a
       * href="http://en.wikipedia.org/wiki/Memoization">memoization</a>
       *
       * <p>The returned supplier is thread-safe. The delegate's {@code get()} method will be invoked at
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Tue Mar 31 21:24:28 GMT 2026
    - 16.1K bytes
    - Click Count (0)
  7. docs/zh/docs/how-to/conditional-openapi.md

    在生产环境隐藏文档界面并不应该成为保护 API 的方式。
    
    这并不会给你的 API 增加任何额外的安全性,*路径操作* 仍然会在原来的位置可用。
    
    如果你的代码里有安全漏洞,它仍然存在。
    
    隐藏文档只会让理解如何与 API 交互变得更困难,也可能让你在生产环境中调试更困难。这大体上可以被视为一种 [通过隐藏实现安全](https://en.wikipedia.org/wiki/Security_through_obscurity) 的做法。
    
    如果你想保护你的 API,有很多更好的措施,例如:
    
    - 确保为请求体和响应定义完善的 Pydantic 模型。
    - 使用依赖配置所需的权限和角色。
    - 绝不要存储明文密码,只存储密码哈希。
    - 实现并使用成熟的密码学工具,比如 pwdlib 和 JWT 令牌等。
    - 在需要的地方使用 OAuth2 作用域添加更细粒度的权限控制。
    - ...等。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 2.2K bytes
    - Click Count (0)
  8. docs/zh-hant/docs/how-to/conditional-openapi.md

    在正式環境中隱藏文件 UI *不應該* 是用來保護 API 的方式。
    
    這並不會為你的 API 增添任何額外的安全性,*路徑操作* 仍舊照常可用。
    
    若你的程式碼有安全性缺陷,它依然會存在。
    
    隱藏文件只會讓他人更難理解如何與你的 API 互動,也可能讓你在正式環境除錯更困難。這通常僅被視為一種 [以隱匿求安全](https://en.wikipedia.org/wiki/Security_through_obscurity)。
    
    如果你想保護 API,有許多更好的作法,例如:
    
    - 確保針對請求本文與回應,具備定義良好的 Pydantic 模型。
    - 透過依賴設定所需的權限與角色。
    - 切勿儲存明文密碼,只儲存密碼雜湊。
    - 實作並使用成熟且廣為人知的密碼學工具,例如 pwdlib 與 JWT 權杖等。
    - 視需要以 OAuth2 scopes 新增更細緻的權限控管。
    - ...等。
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 2.1K bytes
    - Click Count (0)
  9. android/guava/src/com/google/common/collect/HashBasedTable.java

     * concurrently and one of the threads modifies the table, it must be synchronized externally.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#table">{@code Table}</a>.
     *
     * @author Jared Levy
     * @since 7.0
     */
    @GwtCompatible
    public class HashBasedTable<R, C, V> extends StandardTable<R, C, V> {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  10. guava/src/com/google/common/collect/HashBasedTable.java

     * concurrently and one of the threads modifies the table, it must be synchronized externally.
     *
     * <p>See the Guava User Guide article on <a href=
     * "https://github.com/google/guava/wiki/NewCollectionTypesExplained#table">{@code Table}</a>.
     *
     * @author Jared Levy
     * @since 7.0
     */
    @GwtCompatible
    public class HashBasedTable<R, C, V> extends StandardTable<R, C, V> {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 13:11:08 GMT 2026
    - 4.1K bytes
    - Click Count (0)
Back to Top