[Android/Kotlin] Android Studio에서 JSON Kotlin Class 쉽게 만들어 보았다.
json to kotlin class라는 플러그인을 설치합니다.
Android Studio의 plugins에서
json to kotlin class를 치면 아래와 같이 플러그인이 나옵니다.

설치하고 IDE를 다시 실행합니다.

new -> Kotlin data class File from JSON 또는
JSON 데이터를 복사하고 Command + N을 치면

위와 같이 나옵니다.
Kotlin data classes from JSON을 누르면

JSON 형식을 쓸 수 있는 화면과 글라스 이름을 쓸 수 있는 화면이 있습니다.
입력하고 Generate를 누르면 입력한 JSON값을 이용하여 아래와 같이 데이터 클래스를 생성해 준다.


API 통신 등으로 Json을 클래스를 간단하게 만들어 활용해 봅시다!
Reference
이 문제에 관하여([Android/Kotlin] Android Studio에서 JSON Kotlin Class 쉽게 만들어 보았다.), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/dev_ymk/items/c60b6c0e70384a54079c텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)