public School(JSONObject json) throws WeiboException { try { id = json.getInt("id"); name = json.getString("name"); } catch (JSONException je) { throw new WeiboException(je.getMessage() + ":" + json.toString(), je); } }
public School(Response res) throws WeiboException { super(res); JSONObject json = res.asJSONObject(); try { id = json.getInt("id"); name = json.getString("name"); } catch (JSONException je) { throw new WeiboException(je.getMessage() + ":" + json.toString(), je); } }