-8

Can i get any api's available to convert json to java object?

{
    "trigger": 
    {
        "name": "new user2",

        "input": 
        {
            "auth": "EaIv0NlXiDWJrpvLkAdP",
            "domain": "rangersrockerz"
        }
    }
}
Imran
  • 429
  • 9
  • 23
Altamash Shaikh
  • 99
  • 1
  • 1
  • 7
  • 5
    Welcome to Stack Overflow! Please take the [tour], have a look around, and read through the [help], in particular [*How do I ask a good question?*](/help/how-to-ask) – T.J. Crowder Aug 04 '16 at 07:27

1 Answers1

-1
JsonObject inputObject=new JsonObject();
JsonObject triggerObject=new JsonObject();
JsonObject mainObject=new JsonObject();
try{
   inputObject.put("auth","EaIv0NlXiDWJrpvLkAdP");
   inputObject.put("domain","rangersrockerz");

   triggerObject.put("input",inputObject);
   triggerObject.put("name","new user2");

   mainObject.put("trigger",triggerObject);

} catch(Exception e){
}
Omid Heshmatinia
  • 5,089
  • 2
  • 35
  • 50