無料 · 開発
JSON から Swift Codable.
JSON サンプルを Swift の Codable 構造体に変換。snake_case のキー用の CodingKeys、オプショナル、ネストした型に対応。
Loading the calculator…
使い方: JSON から Swift Codable
データを入力するかファイルを選び、設定を調整して結果を生成します。コピーやダウンロードの前に結果を確認してください。
制限と対応形式
入力内容はお使いの端末で処理されます。
英語の技術説明
Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded.
Integers map to Int, decimals to Double, arrays to [T]; optional or null fields become optionals. A small JSONValue enum is added when a field’s type varies.
user_name becomes let userName: String with case userName = "user_name" in CodingKeys.