Package org.vertx.java.core.json

Examples of org.vertx.java.core.json.JsonArray.addString()


        List<String> seeds = configurator.getSeeds();
        JsonArray arr = new JsonArray();
        json.putArray("seeds", arr);
        if (seeds != null) {
            for (String seed : seeds) {
                arr.addString(seed);
            }
        }

        Policies policies = configuration.getPolicies();
        JsonObject policiesJson = new JsonObject();
View Full Code Here


    Parser parser = new Parser();
    JsonObject packet = new JsonObject();
    packet.putString("type", "event");
    packet.putString("name", "hello");
    JsonArray args = new JsonArray();
    args.addString("whiteship");
    args.addObject(new JsonObject().putString("first name", "keesun"));
    packet.putArray("args", args);

    String encodedString = parser.encodePacket(packet);
    assertThat(encodedString.contains("hello"), is(true));
View Full Code Here

        List<String> seeds = configurator.getSeeds();
        JsonArray arr = new JsonArray();
        json.putArray("seeds", arr);
        if (seeds != null) {
            for (String seed : seeds) {
                arr.addString(seed);
            }
        }

        Policies policies = configuration.getPolicies();
        JsonObject policiesJson = new JsonObject();
View Full Code Here

            String[] vals = query.getParams(param);

            if (vals != null) {
                JsonArray array = new JsonArray();
                for (String val : vals) {
                    array.addString(val);
                }
                json.putArray(param, array);
            }
        }
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.