Package org.json

Examples of org.json.JSONWriter.array()


           
            writer.key("prefix");
            writer.value(query);
           
            writer.key("result");
            writer.array();
            List<SearchResultItem> nodes;
            if(type!=null && type.trim().equals("property")){
                nodes = getRdfContext().getVocabularySearcher().searchProperties(query,projectId);
            }else{
                nodes = getRdfContext().getVocabularySearcher().searchClasses(query,projectId);
View Full Code Here


        try {
          writer.key("code");
          writer.value("ok");
          List<String> domains = guessDomain(project, column);
          writer.key("domains");
          writer.array();
          for(String domain:domains){
            writer.value(domain);
          }
          writer.endArray();
        } catch (Exception e) {
View Full Code Here

    Writer writer = new OutputStreamWriter(out);
      try {
        JSONWriter jsonWriter = new JSONWriter(writer);
        jsonWriter.object();
        jsonWriter.key("services");
        jsonWriter.array();
        for(ReconciliationService service:this.services.values()){
          service.writeAsJson(jsonWriter,true);
        }
        jsonWriter.endArray();
        jsonWriter.endObject();
View Full Code Here

        try {
            jw.object();
            jw.key("status");
            jw.value(getStatusLine());
            jw.key("instances");
            jw.array();
            for (Instance i : instances) {
                instanceInfo(jw, i);
            }
            jw.endArray();
            jw.endObject();
View Full Code Here

            jw.key( "status" );
            jw.value( statusLine );

            jw.key( "repositories" );
            jw.array();
            for ( Repository r : repositories )
            {
                jw.object();
                jw.key( "name" );
                jw.value( r.getName() );
View Full Code Here

                jw.value( r.getName() );
                jw.key( "url" );
                String uri = r.getURI().toString();
                jw.value( uri );
                jw.key( "actions" );
                jw.array();
                boolean enable = true;
                if ( uri.startsWith( "bundle" ) ) {
                    enable = false;
                }
                action( jw, enable, "refreshRepository", "Refresh", "refresh" );
View Full Code Here

                jw.endObject();
            }
            jw.endArray();

            jw.key( "features" );
            jw.array();
            for ( ExtendedFeature f : features )
            {
                featureInfo( jw, f );
            }
            jw.endArray();
View Full Code Here

        try {
            appendJsonpCallback(jsonpCallback, writer);

            JSONWriter json = new JSONWriter(writer);
            try {
                json.array();
                for (String appId : appIds) {
                    json.value(appId);
                }
                json.endArray();
            } catch (JSONException e) {
View Full Code Here

                    printer.printClientConfig(json);
                }
                {
                    json.key("formats");
                    Set<String> formats = printer.getOutputFormatsNames();
                    json.array();
                    for (String format : formats) {
                        json.value(format);
                    }
                    json.endArray();
                }
View Full Code Here

                jw.value( r.getName() );
                jw.key( "url" );
                String uri = r.getURI().toString();
                jw.value( uri );
                jw.key( "actions" );
                jw.array();
                boolean enable = true;
                if ( uri.startsWith( "bundle" ) ) {
                    enable = false;
                }
                action( jw, enable, "refreshRepository", "Refresh", "refresh" );
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.