JSONObject的使用一

public String getHTMLAreaInfo() throws ApplicationException
{
try
{
Map map = iNavigationSev.getHTMLAreaInfo(ID);
JSONObject jsonOut = new JSONObject(map);
//jsonOut.put("HTMLAREA",map);
return jsonOut.toString();
}
catch (JSONException e)
{
e.printStackTrace();
}
}

@Test
public void testGetHtmlAreaInfo() throws Exception
{
String rs_json = iNavigationWs.getHTMLAreaInfo();
JSONObject json = new JSONObject(rs_json);
System.out.println("===========json:" +json);
System.out.println("===========123456:" +json.getString("NAME"));
}

你可能感兴趣的:(JSONObject的使用一)