Examples of opt()


Examples of org.json.JSONObject.opt()

      address.setMobile(Result.toString(jsonObject.opt("Fmobile_" + i)));
      address.setTel(Result.toString(jsonObject.opt("Ftel_" + i)));
      address.setName(Result.toString(jsonObject.opt("Fname_" + i)));
      address.setCreated(Result.parseDate(jsonObject.opt("Fcreate_time_" + i),
          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setModified(Result.parseDate(jsonObject.opt("Fmod_time_" + i), "yyyy-MM-dd HH:mm:ss",
          Locale.CHINA));
      address.setLastUsed(Result.parseDate(jsonObject.opt("Flastuse_time_" + i),
          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setUsedCount(Result.parseInteger(jsonObject.opt("FUsedCount_" + i)));
    }
View Full Code Here

Examples of org.json.JSONObject.opt()

      address.setName(Result.toString(jsonObject.opt("Fname_" + i)));
      address.setCreated(Result.parseDate(jsonObject.opt("Fcreate_time_" + i),
          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setModified(Result.parseDate(jsonObject.opt("Fmod_time_" + i), "yyyy-MM-dd HH:mm:ss",
          Locale.CHINA));
      address.setLastUsed(Result.parseDate(jsonObject.opt("Flastuse_time_" + i),
          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setUsedCount(Result.parseInteger(jsonObject.opt("FUsedCount_" + i)));
    }
    return new Result<List<TenpayAddress>>(addresses);
  }
View Full Code Here

Examples of org.json.JSONObject.opt()

          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setModified(Result.parseDate(jsonObject.opt("Fmod_time_" + i), "yyyy-MM-dd HH:mm:ss",
          Locale.CHINA));
      address.setLastUsed(Result.parseDate(jsonObject.opt("Flastuse_time_" + i),
          "yyyy-MM-dd HH:mm:ss", Locale.CHINA));
      address.setUsedCount(Result.parseInteger(jsonObject.opt("FUsedCount_" + i)));
    }
    return new Result<List<TenpayAddress>>(addresses);
  }

  public OAuth2 getOAuth2() {
View Full Code Here

Examples of org.json.me.JSONArray.opt()

        } else if (o instanceof JSONArray) {
            ja = (JSONArray)o;
            len = ja.length();
            for (i = 0; i < len; ++i) {
                b.append(toString(
                    ja.opt(i), (tagName == null) ? "array" : tagName));
            }
            return b.toString();
        } else {
            s = (o == null) ? "null" : escape(o.toString());
            return (tagName == null) ? "\"" + s + "\"" :
View Full Code Here

Examples of org.json.me.JSONObject.opt()

                        } else if (t == LT) {
                            if (parse(x, o, n)) {
                                if (o.length() == 0) {
                                    context.accumulate(n, "");
                                } else if (o.length() == 1 &&
                                       o.opt("content") != null) {
                                    context.accumulate(n, o.opt("content"));
                                } else {
                                    context.accumulate(n, o);
                                }
                                return false;
View Full Code Here

Examples of org.json.me.JSONObject.opt()

                            if (parse(x, o, n)) {
                                if (o.length() == 0) {
                                    context.accumulate(n, "");
                                } else if (o.length() == 1 &&
                                       o.opt("content") != null) {
                                    context.accumulate(n, o.opt("content"));
                                } else {
                                    context.accumulate(n, o);
                                }
                                return false;
                            }
View Full Code Here

Examples of org.openfaces.org.json.JSONObject.opt()

        TimetableEvent[] targetArray = new TimetableEvent[arrayLength];
        for (int i = 0; i < arrayLength; i++) {
            JSONObject eventObj = (JSONObject) array.get(i);

            TimetableEvent event = new TimetableEvent();
            event.setId((String) eventObj.opt("id"));
            event.setName(eventObj.getString("name"));
            event.setDescription(eventObj.getString("description"));
            if (!eventObj.isNull("resourceId"))
                event.setResourceId(eventObj.getString("resourceId"));
            String startStr = eventObj.getString("startStr");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.