Chinawuseal/JsonToKotlinClass
🚀 Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )
Thành tựu nổi bật
Những danh hiệu mới nhất của dự án
#1 Repository Của Tuần
#1 Repository Của Tuần
#1 Repository Của Tuần
⚡ Plugin biến JSON thành Kotlin data class chỉ với một phím tắt
Paste JSON → nhấn ALT+K → có data class. Thế là xong.
JsonToKotlinClass là plugin cho Android Studio và IntelliJ IDEA, tự động sinh mã Kotlin data class từ chuỗi JSON, JSONSchema, URL trả về JSON, hoặc file JSON cục bộ. Dự án do wuseal phát triển, được duy trì tích cực với 3.178 sao trên GitHub.
✨ Điểm nổi bật
- Phím tắt ALT+K / Option+K: sinh data class ngay trong IDE mà không cần rời bàn phím
- Hỗ trợ đa nguồn: JSON string, JSONSchema, URL, file cục bộ — bất kỳ đâu cũng convert được
- Tương thích nhiều thư viện: Gson, Jackson, Fastjson, Moshi, LoganSquare, kotlinx.serialization
- Nhiều chế độ sinh code: data class riêng lẻ, inner class, hoặc nhiều class trong một file
- Tự động camelCase: đổi tên property sang camelCase khi chọn annotation library
- Nullable thông minh: tự xác định nullability dựa trên cấu trúc JSON
- Thư viện lập trình được: tích hợp qua
com.sealwu.jsontokotlin:library:3.7.4để generate data class trong code - Extensions module: tùy chỉnh plugin theo nhu cầu riêng
💡 Vì sao đáng chú ý
Mỗi lần nhận JSON từ API hay tài liệu, lập trình viên Kotlin đều phải tạo data class thủ công — vừa nhàm chán, vừa dễ sai lệch kiểu dữ liệu. JsonToKotlinClass giải quyết đúng điểm đau đó: paste JSON, chọn annotation library, nhận kết quả ngay. Plugin không chỉ sinh field cơ bản mà còn xử lý nested object, mảng, Map, và cả Android Parcelable.
Điểm khác biệt so với các công cụ online là plugin hoạt động ngay trong IDE, giữ nguyên workflow lập trình. Phiên bản library còn cho phép tích hợp vào build script hoặc tool riêng, mở rộng phạm vi sử dụng beyond IDE.
#Kotlin #AndroidStudioPlugin #IntelliJPlugin #JsonToKotlin #OpenSource #TiniX
Similar Projects
Discover other similar projects and AI models.
A local reactive cache for Java and Android. Now, it supports heap memory、off-heap memory and disk cache.
SVG/XML to Compose ImageVector: IntelliJ IDEA / Android Studio plugin + build-in previewer without compilation, CLI tool, Gradle plugin
Powerful utilities for deserializing Kotlin classes with Gson, Jackson and Android JsonReader.
A CLI and an Intellij plugin for generating Clean Architecture boilerplate for Android projects.
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Java annotation processor to create immutable objects and builders, for records too. Sweep boilerplate code under the rug!