Examples of JSONArray


Examples of com.couchbase.client.java.document.json.JsonArray

                    try {
                        converted = CouchbaseAsyncBucket.JSON_OBJECT_TRANSCODER.stringToJsonObject(response.content());
                    } catch (Exception e) {
                        throw new TranscodingException("Could not decode design document.", e);
                    }
                    JsonArray rows = converted.getArray("rows");
                    List<DesignDocument> docs = new ArrayList<DesignDocument>();
                    for (Object doc : rows) {
                        JsonObject docObj = ((JsonObject) doc).getObject("doc");
                        String id = docObj.getObject("meta").getString("id");
                        String[] idSplit = id.split("/");
View Full Code Here

Examples of com.crashnote.external.json.JSONArray

    }

    @Override
    public void appendTo(final String key, final Object data) {
        if (!containsKey(key)) put(key, new JSONDataArray());
        final JSONArray arr = (JSONArray) get(key);
        arr.add(data);
    }
View Full Code Here

Examples of com.cumulocity.me.rest.json.JSONArray

        assertThat(representation.getReferences().size()).isEqualTo(getListOfReferences().size());
    }

    private JSONArray getJsonArrayReferenceRepresentation() {
        JSONArray jsonArray = aJSONArray()
                .withPropertyBuilder(getMinimalJsonManagedObjectReferenceRepresentation())
                .withPropertyBuilder(getMinimalJsonManagedObjectReferenceRepresentation()).build();
        return jsonArray;
    }
View Full Code Here

Examples of com.dotcms.repackage.org.codehaus.jettison.json.JSONArray

   
 
   
        // get our JSON Going
        JSONObject json = new JSONObject()
    JSONArray jsonCons = new JSONArray()

    for(Contentlet c : cons){
     
     
      try {
       
        jsonCons.put(contentletToJSON(c));
       
      } catch (Exception e) {
        Logger.error(this.getClass(), "unable JSON contentlet " + c.getIdentifier());
        Logger.debug(this.getClass(), "unable to find contentlet", e);
      }
View Full Code Here

Examples of com.dotcms.repackage.org.json.JSONArray

        response.getWriter().flush();
    }

    private JSONObject getAllWordSuggestions(JSONObject params) throws SpellCheckException, JSONException {
        JSONObject suggestions = new JSONObject();
        JSONArray checkedWords = params.optJSONArray("words");
        String lang = params.optString("lang");
        lang = ("".equals(lang)) ? DEFAULT_LANGUAGE : lang;
        List<String> misspelledWords = findMisspelledWords(new JsonArrayIterator(checkedWords), lang);
        for (String misspelledWord : misspelledWords) {
            List<String> suggestionsList = findSuggestions(misspelledWord, lang, maxSuggestionsCount);
View Full Code Here

Examples of com.dotmarketing.util.json.JSONArray

            //If we have errors lets return them in order to feedback the user
            if ( responseMap != null && !responseMap.isEmpty() ) {

                //Error messages
                JSONArray jsonErrors = new JSONArray( (ArrayList) responseMap.get( "errorMessages" ) );

                //Prepare the Json response
                JSONObject jsonResponse = new JSONObject();
                jsonResponse.put( "errorMessages", jsonErrors.toArray() );
                jsonResponse.put( "errors", responseMap.get( "errors" ) );
                jsonResponse.put( "total", responseMap.get( "total" ) );
                jsonResponse.put( "bundleId", responseMap.get( "bundleId" ) );

                //And send it back to the user
View Full Code Here

Examples of com.dubture.getcomposer.core.collection.JsonArray

      diag.setHandler(text);
      diag.setEventEnabled(false);
      if (diag.open() == Dialog.OK) {
        String handler = diag.getHandler();
        if (!handler.equalsIgnoreCase(text)) {
          JsonArray events = composerPackage.getScripts().getAsArray(event);
          events.replace(text, handler);
        }
      }
    }
  }
View Full Code Here

Examples of com.eclipsesource.json.JsonArray

    }

    @Override
    public void writeResponse(ManagementCenterService mcs, JsonObject root) {
        final JsonObject result = new JsonObject();
        JsonArray logs = new JsonArray();
        result.add("logs", logs);
        root.add("result", result);
    }
View Full Code Here

Examples of com.facebook.presto.hive.shaded.org.json.JSONArray

      }
      TSerializer serializer = new TSerializer(new TJSONProtocol.Factory());
      try {
        String tableDesc = serializer.toString(tableHandle.getTTable(), "UTF-8");
        jsonContainer.put("table", tableDesc);
        JSONArray jsonPartitions = new JSONArray();
        if (partitions != null) {
          for (org.apache.hadoop.hive.ql.metadata.Partition partition : partitions) {
            String partDesc = serializer.toString(partition.getTPartition(), "UTF-8");
            jsonPartitions.put(partDesc);
          }
        }
        jsonContainer.put("partitions", jsonPartitions);
      } catch (TException e) {
        throw new SemanticException(
View Full Code Here

Examples of com.fins.org.json.JSONArray

    return bean;
  }
 
  public static JSONArray BeanList2JSONArray(List list , Class beanClass){
    Object[] info = BeanUtils.getCacheGetterMethodInfo(beanClass);
    JSONArray jsonArray=new JSONArray();
    for (int i = 0,end=list.size(); i < end; i++) {
      jsonArray.put(Bean2JSONObject(list.get(i),info));
    }
    return jsonArray;
  }
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.