예제 #1
0
 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);
   }
 }
예제 #2
0
 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);
   }
 }