As I am using jersey the method you suggested above doesn't work. I used below code to parse.
@Path("/any")
@Consumes("application/json")
public String getAllData(JSONArray pidValues)
{
String [] accessiblepid = new String[pidValues.size()];
LinkedHashMap<String, String> mapList = new LinkedHashMap<String, String>();
String subProgId="";
JSONArray jsonArray = new JSONArray();
JSONArray jsonArrayPid = new JSONArray();
for (int i=0; i<pidValues.size();i++)
{
System.out.println(pidValues.get(i));
mapList =(LinkedHashMap<String, String>) pidValues.get(i);
System.out.println(mapList.get("PID"));
accessiblepid[i] = mapList.get("PID").toString();
jsonArray.add(mapList.get("dashboardName").toString());
jsonArrayPid.add(mapList.get("PID").toString());
subProgId=mapList.get("associatedSubFeatureID");
}
return "";
}
делает [Oracle Java API для обработки JSON ссылки помощи] (http://www.oracle.com/technetwork/articles/java/json-1973242.html) \ – TravisF
Нет не Ждут» t помочь в моем случае. Я попробовал решение, но не повезло. – Manoj