<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.4</version>
</dependency>
JSONObject jsonObject = new JSONObject();
jsonObject.put("name", "John Doe");
jsonObject.put("age", 30);
jsonObject.put("email", "johndoe@example.com");
String json = "{\"name\":\"John Doe\",\"age\":30,\"email\":\"johndoe@example.com\"}";
JSONObject jsonObject = new JSONObject(json);
String name = jsonObject.getString("name");
int age = jsonObject.getInt("age");
String email = jsonObject.getString("email");
User user = new User();
user.setName(name);
user.setAge(age);
user.setEmail(email);