The error is last line throw JsonException
Client client = Client.create();
WebResource webResource = client.resource(baseUrl+"/jaspertemplate");
ClientResponse respons = webResource.accept("application/json")
.get(ClientResponse.class);
String output = respons.getEntity(String.class);
JSONObject obj1 = new JSONObject(output.trim());
My JSON:
[
{
"type": "folder",
"name": "PAM",
"path": "C:\\home\\sameer\\sample\\PAM",
"id": "PAM6",
"children": [
{
"type": "file",
"name": "Country_Report_View_PAM.jasper",
"path": "C:\\home\\sameer\\sample\\PAM\\Country_Report_View_PAM.jasper",
"id": "Country_Report_View_PAM.jasper7",
"children": []
}
]
}
]