コード例 #1
0
 @Override
 public boolean parseJson(JSONObject jo) {
   if (jo == null) {
     return false;
   }
   this.document_id = JsonUtility.getString(jo, "document_id", "");
   this.document_url = JsonUtility.getString(jo, "document_url", "");
   this.name = JsonUtility.getString(jo, "name", "");
   this.time = JsonUtility.getString(jo, "time", "");
   this.size = JsonUtility.getString(jo, "size", "");
   return true;
 }
コード例 #2
0
  @Override
  public boolean parseJson(JSONObject jo) {
    // TODO Auto-generated method stub
    if (jo == null) {
      return false;
    }
    this.photo = JsonUtility.getString(jo, "photo", "");
    Date ds = JsonUtility.getDate(jo, "time", null);
    if (ds != null) {
      this.time = (String) DateFormat.format("yyyy-MM-dd", ds);
    }

    return true;
  }
コード例 #3
0
  @Override
  public boolean parseJson(JSONObject jo) {
    // TODO Auto-generated method stub
    if (jo == null) {
      return false;
    }
    this.news_id = JsonUtility.getString(jo, "news_id", "0");
    this.image_url = JsonUtility.getString(jo, "image_url", "");
    this.news_title = Utility.decodeUnicode(JsonUtility.getString(jo, "news_title", ""));
    this.news_content = Utility.decodeUnicode(JsonUtility.getString(jo, "news_content", ""));
    this.news_praise = JsonUtility.getString(jo, "news_praise", "");

    return true;
  }