Unable to create jsonschema for retrofit in android. How to generate jsonschema Java?

31 views Asked by At

I want to create JSONschema for Java through jsonschema2pojo but return an empty screen below is a valid JSON string, how to create model classes in java for such JSON string while using retrofit2?

[
   [
      "S#",
      "Name of Minister",
      "Portfolio",
      "Contact #",
      "PRO Name",
      "PRO Contact",
      "PRO Contact #"
   ],
   [
      "1",
      "Mr. Mohammad Ali Saif",
      "Information and PRs",
      "9212894",
      "Mr. Rizwan Malik",
      "0345-",
      ""
   ],
   [
      "2",
      "Mr. Abdul Karim",
      "Industries",
      "9213859",
      "Mr. Khan Sarwar",
      "0333-",
      "abdulkarim.png"
   ]
]
1

There are 1 answers

2
kervin On

You can use fastjson api ,FastJson provides easily APIs to convert Java objects to / from JSON