無料 · 開発
JSON から Pydantic モデル.
JSON サンプルを Pydantic v2 モデルに変換。snake_case のフィールド、元のキーのエイリアス、任意フィールド、ネストしたクラスに対応。
Loading the calculator…
使い方: JSON から Pydantic モデル
データを入力するかファイルを選び、設定を調整して結果を生成します。コピーやダウンロードの前に結果を確認してください。
制限と対応形式
入力内容はお使いの端末で処理されます。
英語の技術説明
Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded.
Fields missing from some array items or null in the sample become optional (X | None = None); integers and decimals merge to float; differing types become Any. Python keywords get a trailing underscore.
A user with isActive, an address and a list of orders becomes User, Address and Order models; isActive becomes is_active with alias "isActive".