Package com.fasterxml.jackson.databind

Examples of com.fasterxml.jackson.databind.JsonNode.asBoolean()


            configArgs.add("--num-concurrent");
            configArgs.add(numConcurrentDownloadsNode.asText());
        }
        JsonNode dryRunNode = root.get("dryRun");
        if (dryRunNode != null) {
            if (dryRunNode.asBoolean()) {
                configArgs.add("--dry-run");
            }
        }
        JsonNode syncDirectoryNode = root.get("syncDirectory");
        if (syncDirectoryNode != null) {
View Full Code Here


    private static SockJsConfig parseSockJsProperties(final JsonNode json) {
        final JsonNode prefixNode = json.get("sockjs-prefix");
        final String prefix = prefixNode != null ? prefixNode.asText() : "/simplepush";
        final org.jboss.aerogear.io.netty.handler.codec.sockjs.SockJsConfig.Builder builder = SockJsConfig.withPrefix(prefix);
        final JsonNode cookiesNeeded = json.get("sockjs-cookies-needed");
        if (cookiesNeeded != null && cookiesNeeded.asBoolean()) {
            builder.cookiesNeeded();
        }
        final JsonNode sockjsUrl = json.get("sockjs-url");
        if (sockjsUrl != null) {
            builder.sockJsUrl(sockjsUrl.asText());
View Full Code Here

        if (keystorePassword != null) {
            builder.keyStorePassword(keystorePassword.asText());
        }
        final JsonNode tls = json.get("sockjs-tls");
        if (tls != null) {
            builder.tls(tls.asBoolean());
        }
        final JsonNode websocketEnable = json.get("sockjs-websocket-enable");
        if (websocketEnable != null && !websocketEnable.asBoolean()) {
            builder.disableWebSocket();
        }
View Full Code Here

        final JsonNode tls = json.get("sockjs-tls");
        if (tls != null) {
            builder.tls(tls.asBoolean());
        }
        final JsonNode websocketEnable = json.get("sockjs-websocket-enable");
        if (websocketEnable != null && !websocketEnable.asBoolean()) {
            builder.disableWebSocket();
        }
        final JsonNode websocketHeartbeatInterval = json.get("sockjs-websocket-heartbeat-interval");
        if (websocketHeartbeatInterval != null) {
            builder.webSocketHeartbeatInterval(websocketHeartbeatInterval.asLong());
View Full Code Here

        if (endpointPort != null) {
            builder.endpointPort(endpointPort.asInt());
        }
        final JsonNode endpointTls = json.get("endpoint-tls");
        if (endpointTls != null) {
            builder.endpointTls(endpointTls.asBoolean());
        }
        final JsonNode endpointPrefix = json.get("endpoint-prefix");
        if (endpointPrefix != null) {
            builder.endpointPrefix(endpointPrefix.asText());
        }
View Full Code Here

        if (tree.has("value")) {
            JsonNode node = tree.get("value");
            value = node.isNull()
                    ? null
                    : node.isBoolean()
                    ? node.asBoolean()
                    : node.isDouble()
                    ? node.asDouble()
                    : node.isLong()
                    ? node.asLong()
                    : node.isInt()
View Full Code Here

            if (node.isNull()) {
                values.add(null);
            } else if (node.isObject()) {
                values.add(((ObjectNode) node).traverse(jp.getCodec()).readValueAs(GuardedString.class));
            } else if (node.isBoolean()) {
                values.add(node.asBoolean());
            } else if (node.isDouble()) {
                values.add(node.asDouble());
            } else if (node.isLong()) {
                values.add(node.asLong());
            } else if (node.isInt()) {
View Full Code Here

                    JsonNode value = parsed.get(field);
                    if (value.isBigDecimal()) {
                        call.setBigDecimal(field, value.decimalValue());
                    }
                    else if (value.isBoolean()) {
                        call.setBoolean(field, value.asBoolean());
                    }
                    else if (value.isDouble()) {
                        call.setDouble(field, value.asDouble());
                    }
                    else if (value.isInt()) {
View Full Code Here

                    child.remove();
                }
                if (value.isNull()) {
                    tree.removeProperty(name);
                } else if (value.isBoolean()) {
                    tree.setProperty(name, value.asBoolean());
                } else if (value.isLong()) {
                    tree.setProperty(name, value.asLong());
                } else if (value.isDouble()) {
                    tree.setProperty(name, value.asDouble());
                } else if (value.isBigDecimal()) {
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.