Link to home
Start Free TrialLog in
Avatar of chand pb
chand pbFlag for United States of America

asked on

How do I create a java object (POJO) for json

Hello,
 I want to produce an output json string as define below.What would the java POJO look like ?.. I want to use GSON library  from object to string.

{
    "addresses": [
        {
            "status": "submitted",
            "info": [
                {
                    "name": "name1",
                    "city": "city1",
                    
                },
                {
                    "name": "name2",
                    "city": "city1"
                  
                }
            ]
        },
        {
            "status": "inProgress",
            "info": [
                {
                     "name": "name3",
                    "city": "city1",
                   
                },
                {
                     "name": "name4",
                    "city": "city1"
                   
                }
            ]
        }
    ]
  
}

Open in new window



Thanks for your help
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial