import org.json.JSONObject;
import org.json.JSONException;
// .......
try {
String response = s.hasNext() ? s.next() : "";
JSONObject jsonObject = new JSONObject(response );
System.out.println(jsonObject.toString());
} catch (JSONException err) {
System.out.println("Exception : "+err.toString());
}