JSON → Go 構造体
JSON サンプルから JSON タグ付きの Go 構造体を生成します(ネスト型を含む)。
入力
結果
使い方
Generate Go structs
Paste a representative JSON object and run Convert. Field types are inferred from the sample values.
- Paste a JSON object.
- Click Convert.
- Copy the generated Go code.
Type inference
Whole numbers become int, decimals become float64, booleans become bool, strings become string and nested objects become named structs.
よくある質問
Why is a null field typed as interface{}?
A null value gives no type information, so the generator falls back to interface{}.
Does it handle arrays of objects?
Yes. Arrays become slices, and arrays of objects produce a nested struct type.
関連ツール
JSON → TypeScript
任意型とユニオン型に対応した TypeScript インターフェースを JSON サンプルから生成します。
JSON → C# クラス
JSON サンプルからワンクリックで厳密に型付けされた C# クラスを生成します。
JSON フラット化・復元
ネストした JSON をドット記法のキーに変換し、フラットデータからネストしたオブジェクトを再構築します。
JSON フォーマッター
設定可能なインデント、エラー強調、ワンクリックコピーで JSON を整形・検証します。
JSON バリデーター
JSON が有効かどうかを検証し、構文問題の明確な説明を表示します。
JSON ミニファイアー
不要なスペースと改行をすべて削除して最小の JSON ペイロードを生成します。