if(!message.isEmpty()) {
System.out.println("RECEIVED:");
JSONArray jsonArray = new JSONArray(message);
System.out.println(jsonArray.toString(2));
for (int i = 0; i < jsonArray.length(); ++i)
processMessage(websocket, jsonArray.getJSONObject(i));
}
}
i am able retrieve JSON from method, but not able to show it on webservice , as this is void methos plus its in anonymous class ,returning JSON from this and showing it in rest webservice is very difficult and i am unable to do that . i took that JSON array in list or map , but am unable to return that list with JSON ARRAY an show it on my localhost of webservice .This is only in case of JAVA .