Handler handler = new Handler() { public void handleMessage(Message msg) { json = (JSONObject) msg.obj; try { String status = json.getString("status"); if(status.equals("EEHP_SUCCESS")){ String res = json.getString("Data"); jsonData = new JSONObject(res); String Insunitname = jsonData.getString("Insunitname"); Date Insdate = jsonData.getDate("Insdate"); String Instypename = jsonData.getString("Instypename"); String Insresultname = jsonData.getString("Insresultname"); String Ninsdate = jsonData.getString("Ninsdate"); name.setText(Insunitname); date.setText(Insdate); lei.setText(Instypename); verdict.setText(Insresultname); next_date.setText(Ninsdate); }else{ } } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } } };
解决方案
40
JSONObject 没有getDate方法吧。