示例#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);
   }
 }