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
Author by
Gorets
Updated on July 06, 2022Comments
-
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 over 6 yearsProblem 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 over 6 yearsFor any future visitors, the actual plugin name is JsonToKotlinClass
-
Priya almost 5 yearsIt is perfect way to concert a json to pojo for kotlin !
-
Touhid almost 4 yearsFor online json to data class generator use this: json2kt.com I think it's cool :)
-
Rumit Patel about 2 years