38

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:

enter image description here

You can download it from : "Preferences" -> "Plugins" -> "Browse Repositories" -> "RoboPOJOGenerator"enter image description here

And how to use:

enter image description here

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

enter image description here

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

enter image description here

I hope it can help you to save many time!

ariefbayu
  • 21,849
  • 12
  • 71
  • 92
Thientvse
  • 1,753
  • 1
  • 14
  • 23

0 Answers0