Data ClassesGson AnnotationsNullable Support

How It Works

1

Paste JSON

Paste your JSON data in the input.

2

View Classes

See generated Kotlin data classes.

3

Copy Code

Copy the Kotlin code to your project.

Frequently Asked Questions

Does it generate SerializedName annotations?
Yes. When property names differ from JSON keys, @SerializedName annotations are automatically added for Gson compatibility.
Are nullable types handled?
Yes. Null values in the JSON input are converted to Any? nullable types in Kotlin.
Does it support nested objects and arrays?
Yes. Nested objects become separate data classes, and arrays become List<Type> with proper type inference.
Share:

Love this tool? Explore 999+ more

Free online tools for images, PDFs, text, code, and more. All running in your browser.

Explore All Tools