Examples of JSONArray


Examples of elemental.json.JsonArray

                .getConnectorTracker().getDirtyVisibleConnectors();

        JsonObject hierarchyInfo = Json.createObject();
        for (ClientConnector connector : dirtyVisibleConnectors) {
            String connectorId = connector.getConnectorId();
            JsonArray children = Json.createArray();

            for (ClientConnector child : AbstractClientConnector
                    .getAllChildrenIterable(connector)) {
                if (LegacyCommunicationManager
                        .isConnectorVisibleToClient(child)) {
                    children.set(children.length(), child.getConnectorId());
                }
            }
            try {
                hierarchyInfo.put(connectorId, children);
            } catch (JsonException e) {
View Full Code Here

Examples of external.JSON.JSONArray

    @Override
  protected Set<String> getUncachedGameKeys() {
      Set<String> theGameKeys = new HashSet<String>();
        try {
            JSONArray theArray = RemoteResourceLoader.loadJSONArray(theRepoURL + "/games/");
            for(int i = 0; i < theArray.length(); i++) {
                theGameKeys.add(theArray.getString(i));
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        return theGameKeys;
View Full Code Here

Examples of facebook4j.internal.org.json.JSONArray

                JSONObject fromJSONObject = json.getJSONObject("from");
                from = new IdNameEntityJSONImpl(fromJSONObject);
            }
            if (!json.isNull("to")) {
                JSONObject toJSONObject = json.getJSONObject("to");
                JSONArray toJSONArray = toJSONObject.getJSONArray("data");
                to = new ArrayList<IdNameEntity>();
                for (int i = 0; i < toJSONArray.length(); i++) {
                    to.add(new IdNameEntityJSONImpl(toJSONArray.getJSONObject(i)));
                }
            } else {
                to = Collections.emptyList();
            }
            message = getRawString("message", json);
            createdTime = getISO8601Datetime("created_time", json);
            updatedTime = getISO8601Datetime("updated_time", json);
            if (!json.isNull("comments")) {
                JSONObject commentsJSONObject = json.getJSONObject("comments");
                if (!commentsJSONObject.isNull("data")) {
                    JSONArray list = commentsJSONObject.getJSONArray("data");
                    final int size = list.length();
                    comments = new PagableListImpl<Comment>(size, commentsJSONObject);
                    for (int i = 0; i < size; i++) {
                        CommentJSONImpl comment = new CommentJSONImpl(list.getJSONObject(i));
                        comments.add(comment);
                    }
                } else {
                    comments = new PagableListImpl<Comment>(1, commentsJSONObject);
                }
View Full Code Here

Examples of io.vertx.core.json.JsonArray

        DefaultWhenJerseyServer whenJerseyServer = new DefaultWhenJerseyServer(vertx, server, options, when);

        JsonObject config = new JsonObject()
                .put("host", host)
                .put("port", port)
                .put("resources", new JsonArray().add("com.englishtown.vertx.jersey.promises.integration.resources"));

        CountDownLatch latch = new CountDownLatch(1);

        whenJerseyServer.createServer(config)
                .then(value -> {
View Full Code Here

Examples of javax.json.JsonArray

    @Test
    public final void createsMkCommit() throws Exception {
        final JsonObject author = Json.createObjectBuilder()
            .add("name", "Scott").add("email", "Scott@gmail.com")
            .add("date", "2008-07-09T16:13:30+12:00").build();
        final JsonArray tree = Json.createArrayBuilder()
            .add("xyzsha12").build();
        final Commit newCommit = this.repo().git().commits().create(
            Json.createObjectBuilder().add("message", "my commit message")
                .add("sha", "12ahscba")
                .add("tree", "abcsha12")
View Full Code Here

Examples of loxia.support.json.JSONArray

    result.put("page", isPagable());
    result.put("pageSize", getItemPerPage());
    result.put("currentPage", getCurrentPage());
    result.put("itemCount", getCount());
    if(filterStr == null || filterStr.trim().length() ==0)
      result.put("data", new JSONArray(getItems()));
    else
      result.put("data", new JSONArray(getItems(),filterStr));
    return new JSONObject(result);
  }
View Full Code Here

Examples of net.jangaroo.exml.json.JsonArray

            return Double.parseDouble(attributeValue);
          case UINT:
          case INT:
            return Long.parseLong(attributeValue);
          case ARRAY:
            return new JsonArray(attributeValue);
        }
      }
    }
    // code expression, Object or specific type. We don't care (for now).
    return attributeValue;
View Full Code Here

Examples of net.minecraft.util.com.google.gson.JsonArray

            }
        }
    }

    public JsonElement a() {
        JsonArray jsonarray = new JsonArray();
        Iterator iterator = this.iterator();

        while (iterator.hasNext()) {
            String s = (String) iterator.next();

            jsonarray.add(new JsonPrimitive(s));
        }

        return jsonarray;
    }
View Full Code Here

Examples of net.minidev.json.JSONArray

      for (final String field : dlsPermission.keySet()) {

        final DlsPermission dlsPerm = new DlsPermission();
        dlsPerm.setField(field);

        JSONArray ja = (JSONArray) ((JSONObject) dlsPermission
            .get(field)).get("read");
        dlsPerm.addReadTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("update");
        dlsPerm.addUpdateTokens(ja.toArray(new String[0]));

        ja = (JSONArray) ((JSONObject) dlsPermission.get(field))
            .get("delete");
        dlsPerm.addDeleteTokens(ja.toArray(new String[0]));

        perms.add(dlsPerm);
      }

    }
View Full Code Here

Examples of net.sf.json.JSONArray

    }


    public static JSONArray getJSONArray(JSONObject obj, String key, JSONArray... default_value) {
        try {
            JSONArray object = obj.getJSONArray(key);
            if (object == null) return default_value.length == 0 ? null : default_value[0];
            return object;
        } catch (Exception e) {
            return default_value.length == 0 ? null : default_value[0];
        }
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.