Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 11 of 11 for json (0.29 sec)

  1. docs/zh/docs/tutorial/path-params.md

    ```
    
    !!! tip "提示"
    
        使用 `ModelName.lenet.value` 也能获取值 `"lenet"`。
    
    #### 返回*枚举元素*
    
    即使嵌套在 JSON 请求体里(例如, `dict`),也可以从*路径操作*返回*枚举元素*。
    
    返回给客户端之前,要把枚举元素转换为对应的值(本例中为字符串):
    
    ```Python hl_lines="18  21  23"
    {!../../../docs_src/path_params/tutorial005.py!}
    ```
    
    客户端中的 JSON 响应如下:
    
    ```JSON
    {
      "model_name": "alexnet",
      "message": "Deep Learning FTW!"
    }
    ```
    
    ## 包含路径的路径参数
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 05:35:40 GMT 2024
    - 7.6K bytes
    - Viewed (0)
Back to top