How to convert JSON to Model(Data) class in kotlin.| Kotlins pojo from JSON. #kotlin 11 program.
Описание
How to convert JSON to Model(Data) class in kotlin.| Kotlins pojo from JSON. #kotlin 11 program.
Steps to install Plugins in Android studio.
Go to file -- setting-- plugins-- search for json to kotlin class--
install it and apply -- ok it wil rebuilt the Android studio/
Creating Data class from json
Copy json file
open Androis studion select folder where you want to add model class.
Left click on folder or directory -- new -- 'kotlin data class from json'
Paste the json file and name the file top class -- ok.
it will create a model class for that json file.
it is mostly used with retrofit or valley for parsing json response to that particular model/data class.
My channel link subscribe to my channel
https://www.youtube.com/channel/UCCjZhrC5VJj-ost-9mPokDg
that's it from today hope you understand this video
please suggest if you want a video in any topic in comment below
Thanks
Рекомендуемые видео







