How to use RoboPOJOGenerator to automatically generate model class from Json in Android Studio [closed]

冷暖自知 提交于 2019-12-18 10:42:51

问题


I will share a way to generate class from Json in Android.

Generate Java and Kotlin POJO files from JSON: GSON, AutoValue, Logan Square, FastJSON, Jackson, Moshi, empty annotations template. Supports: primitive types, multiple inner JSONArrays.

This is a demo:

You can download it from : "Preferences" -> "Plugins" -> "Browse Repositories" -> "RoboPOJOGenerator"

And how to use:

And you paste you json to popup and choose parser type:

And click generate, it will gen class from json for you!

I hope it can help you to save many time!

来源:https://stackoverflow.com/questions/47707564/how-to-use-robopojogenerator-to-automatically-generate-model-class-from-json-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!