Examples of JSONArray


Examples of com.persiste.sdk.json.JSONArray

    return m;
  }
 
  private List createArrayContainer(ContainerFactory containerFactory){
    if(containerFactory == null)
      return new JSONArray();
    List l = containerFactory.creatArrayContainer();
   
    if(l == null)
      return new JSONArray();
    return l;
  }
View Full Code Here

Examples of com.qq.open.common.json.JSONArray

      if (!"null".equals(jsonDataObj.get("tag").toString())) {
        // 听众标签集合
        List<WeiBoTagResultBean> tagsList = new ArrayList<WeiBoTagResultBean>();
       
        // 听众标签
        JSONArray tagsArray = jsonDataObj.getJSONArray("tag");
       
        for (int j = 0; j < tagsArray.length(); j++) {
          WeiBoTagResultBean tagsBean = new WeiBoTagResultBean();
          // 听众标签
          JSONObject tagsObject = new JSONObject(tagsArray.get(j).toString());
         
          // 标签ID
          tagsBean.setId(tagsObject.getString("id"));
         
          // 标签名
          tagsBean.setName(tagsObject.getString("name"));
         
          tagsList.add(tagsBean);
        }
        resultBean.setTagsList(tagsList);
      }
     
      if (!"null".equals(jsonDataObj.get("edu").toString())) {
       
        List<WeiBoEduResultBean> edusList = new ArrayList<WeiBoEduResultBean>();
       
        // 听众标签
        JSONArray edusArray = jsonDataObj.getJSONArray("edu");
       
        for (int j = 0; j < edusArray.length(); j++) {
          WeiBoEduResultBean edusBean = new WeiBoEduResultBean();
          // 听众标签
          JSONObject edusObject = new JSONObject(edusArray.get(j).toString());
         
          // 教育信息记录ID
          edusBean.setId(edusObject.get("id").toString());
         
          // 入学年
View Full Code Here

Examples of com.restartle.json.JsonArray

          dumper.indent();
          analyze(dumper, obj);
          dumper.outdent();
        }
      } else if (value instanceof JsonArray) {
        JsonArray ar = (JsonArray) value;
        if (ar.size() == 0) {
          dumper.line("%: []", key);
        } else if (ar.get(0) instanceof JsonObject) {
          dumper.line("%: array", key);
          dumper.indent();
          analyze(dumper, (JsonObject) ar.get(0));
          dumper.outdent();
        } else {
          dumper.line("%: [%, ...]", key, ar.get(0));
        }
      } else {
        dumper.line("%: %", key, value);
      }
    }
View Full Code Here

Examples of com.restfb.json.JsonArray

    } catch (JsonException e) {
      throw new FacebookJsonMappingException("The connection JSON you provided was invalid: " + json, e);
    }

    // Pull out data
    JsonArray jsonData = jsonObject.getJsonArray("data");
    for (int i = 0; i < jsonData.length(); i++)
      data.add(connectionType.equals(JsonObject.class) ? (T) jsonData.get(i) : facebookClient.getJsonMapper()
        .toJavaObject(jsonData.get(i).toString(), connectionType));

    // Pull out paging info, if present
    if (jsonObject.has("paging")) {
      JsonObject jsonPaging = jsonObject.getJsonObject("paging");
      previousPageUrl = jsonPaging.has("previous") ? jsonPaging.getString("previous") : null;
View Full Code Here

Examples of com.sdicons.json.model.JSONArray

      JSONValue jsonObject = parser.nextValue();
      if (jsonObject.isComplex()) {

        JSONObject complex = (JSONObject) jsonObject;
        JSONObject jsonResults = (JSONObject) complex.get("results");
        JSONArray bindings = (JSONArray) jsonResults.get("bindings");
        for (int i = 0; i < bindings.getValue().size(); i++) {
          Map<String, String> result = new HashMap<String, String>();
          cont++;
          JSONObject jsonResult = (JSONObject) bindings.get(i);
          for (String var : getVariablesFromJson(complex)) {
            JSONObject element = (JSONObject) jsonResult.get(var);
            String value = null;
            if (element != null) {
              String type = ((JSONString) element.get("type"))
View Full Code Here

Examples of com.serotonin.json.type.JsonArray

    }
   
    email = jsonObject.getBoolean("email");
    if(email){
     
      JsonArray recipientsArray = jsonObject.getJsonArray("recipients");
      boolean add = true;
      if(recipientsArray != null){
        for(JsonValue jv : recipientsArray){
          RecipientListEntryBean recipient = new RecipientListEntryBean();
          reader.readInto(recipient, jv);
View Full Code Here

Examples of com.threealike.life.thirdparty.org.json.JSONArray

      Env.SHUT_LISTENERS.put(label, new ArrayList<ServiceStopListener>());
    Env.SHUT_LISTENERS.get(label).add(listener);
  }
 
  public static final JSONObject getServiceConfig(String serviceLabel) {
    JSONArray services = getConfig().getJSONArray("services");
    for(int i=0; i < services.length(); i++) {
      JSONObject service = services.getJSONObject(i);
      if(service.getString("label").equals(serviceLabel)) {
        return service;
      }
    }
    return null;
View Full Code Here

Examples of com.zaranux.os.server.util.JSONArray

                back();
                return new JSONObject(this);
            case '[':
            case '(':
                back();
                return new JSONArray(this);
        }

        /*
         * Handle unquoted text. This could be the values true, false, or
         * null, or it can be a number. An implementation (such as this one)
View Full Code Here

Examples of controller.util.JSONArray

    // Get the string IDs of all the switches and create switch summary
    // objects for each one
    try {
      Future<Object> devices = Deserializer.readJsonArrayFromURL("http://" + IP
          + ":" + PORT + "/wm/device/");
      JSONArray json = (JSONArray) devices.get(5, TimeUnit.SECONDS);
      for (int i = 0; i < json.length(); i++) {
        obj = json.getJSONObject(i);
        DeviceSummary temp = new DeviceSummary(obj.getJSONArray("mac")
            .getString(0));
        if (!obj.getJSONArray("ipv4").isNull(0))
          temp.setIpv4(obj.getJSONArray("ipv4").getString(0));
        if (!obj.getJSONArray("attachmentPoint").isNull(0)) {
View Full Code Here

Examples of de.yaams.extensions.basemap.org.json.JSONArray

   * @throws ParseException
   */
  public static JSONArray getAsJSONArray(Object obj) throws ParseException {
    // We always convert to a json array: json object become a json array
    // with one item
    JSONArray result = null;

    if (obj instanceof JSONArray) {
      result = (JSONArray) obj;
    } else if (obj instanceof JSONObject) {
      result = new JSONArray();
      result.put(obj);
    } else {
      throw new ParseException("problem while interpreting " + obj, 0);
    }

    return result;
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.