I got this json object data which is
{
"data": {
"id": 2,
"email": "[email protected]",
"first_name": "Janet",
"last_name": "Weaver",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/josephstein/128.jpg"
},
"ad": {
"company": "StatusCode Weekly",
"url": "http://statuscode.org/",
"text": "A weekly newsletter focusing on software development, infrastructure, the server, performance, and the stack end of things."
}
}
I want to parse json which i want to print output email in object...I use org.simple.json library .
Runtime rt = Runtime.getRuntime();
Process pr = rt.exec("curl -s -S https://reqres.in/api/users/2");
BufferedReader br = new BufferedReader(new InputStreamReader(pr.getInputStream()));
String result = br.readLine();
Object obj=JSONValue.parse(result);
How do I println email data via data -> email