PasteZap
🌐 日本語
無料 · アカウント不要

無料 · 開発

JSON から Kotlin データクラス.

JSON サンプルを kotlinx.serialization 用の Kotlin データクラスに変換。@SerialName と null 許容の任意フィールドに対応。

はじめる前に

一部の技術的な操作項目は英語です。Unicode テキストに対応していますが、ファイル形式と出力言語はツールによって異なります。

技術的な制限は以下に英語で記載されています。大きなファイルを処理する前や結果を使用する前に確認してください。

Loading the calculator…

使い方: JSON から Kotlin データクラス

データを入力するかファイルを選び、設定を調整して結果を生成します。コピーやダウンロードの前に結果を確認してください。

制限と対応形式

入力内容はお使いの端末で処理されます。

英語の技術説明

Types are inferred from the sample only. Everything is calculated in your browser; nothing you type is uploaded.

Integers map to Long, decimals to Double, lists to List<T> and varying values to JsonElement. Kotlin keywords are escaped with backticks.

user_name becomes @SerialName("user_name") val userName: String; a coupon present in only one order becomes String? = null.