Json to kotlin data classes

16,225

There is a plugin for Android Studio and Intellij Idea called JsonToKotlinClass.

You can convert json into kotlin's data class with it: https://github.com/wuseal/JsonToKotlinClass

A AndroidStudio plugin for Converting json string into kotlin data class

Share:
16,225
Gorets
Author by

Gorets

Updated on July 06, 2022

Comments

  • Gorets
    Gorets almost 2 years

    Is there existing service for generating kotlin data classes from json model in the way how it works on http://www.jsonschema2pojo.org/ site? My new project has over complicated API responses, so it would save me time.

  • Henrique de Sousa
    Henrique de Sousa over 6 years
    Problem is, it doesn't work when the the Json string is an Array
  • 吴海豹
    吴海豹 over 6 years
    @HenriquedeSousa You can raise an issue here: github.com/wuseal/JsonToKotlinClass/issues
  • Drew Szurko
    Drew Szurko over 6 years
    For any future visitors, the actual plugin name is JsonToKotlinClass
  • Priya
    Priya almost 5 years
    It is perfect way to concert a json to pojo for kotlin !
  • Touhid
    Touhid almost 4 years
    For online json to data class generator use this: json2kt.com I think it's cool :)
  • Rumit Patel
    Rumit Patel about 2 years