🛡️TypeSafe 中文文档
原文档 ↗

通用类型

TypeSafe API SDK 的通用类型。

typesafe_sdk.JSONValue

module-attribute


  JSONValue = TypeAliasType(
    "JSONValue",
    "str | int | float | bool | Sequence[JSONValue | None] | Mapping[str, JSONValue | None]",
)

类似 JSON 的值。可以嵌套,并可包含 None。

typesafe_sdk.JSONContent

module-attribute


  JSONContent = TypeAliasType(
    "JSONContent",
    "str | Mapping[str, JSONValue | None] | Sequence[JSONValue | None]",
)

可以是纯字符串,也可以是 JSONValue 条目构成的映射/序列。

本站为 docs.typesafe.ai 的中文翻译,仅供学习参考;内容版权归原作者所有。