I am doing work around HTTPClient to send the POST request and get the response. I am getting the response code is OK.
I want to read few contents from that response HttpEntity entity =response.getEntity();
I am printing that response on console System.out.println(EntityUtils.toString(entity));.
it’s printing {"created_at":"2011-12-01T07:56:50+00:00","type":"sample","id":29,"status":"received"}
I want to read the id from the above string,.
Any one can help how to retrieve the id from the entity.
Thanks in advance..
The data is JSON data.
You can go to json.org and download JSONObject.
You can do this,