private static boolean getBooleanField(final JsonNode node, final String fieldName) throws IOException { return getField(node, fieldName).getBooleanValue(); }
if (!oneWayNode.isBoolean()) throw new SchemaParseException("one-way must be boolean: "+json); oneWay = oneWayNode.getBooleanValue();
return new ServerStatus(spec.getHostname(), code, description, value.get("isLeader").getBooleanValue());
return fieldNode.getBooleanValue();
return fieldNode.getBooleanValue();
if (!n.isBoolean()) throw new AvroTypeException("Non-boolean default for boolean: "+n); e.writeBoolean(n.getBooleanValue()); break; case NULL:
public boolean getBooleanValue() { return delegate.getBooleanValue(); }
return jsonNode.getDoubleValue(); case BOOLEAN: return jsonNode.getBooleanValue(); case TIMESTAMP: long time = isoFormatter.parseMillis(jsonNode.getTextValue());
/** * Returns the indicator if the bundle is a fragment * * @return {@code true} if bundle is a fragment, {@code false} otherwise. */ public boolean isFragment() { return bundle.get("fragment").getBooleanValue(); }
public static boolean getBoolean(JsonNode node, String prop, boolean defaultValue) throws JsonFormatException { if (node.get(prop) == null) { return defaultValue; } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a string property: " + prop); } return node.get(prop).getBooleanValue(); }
public static Boolean getBoolean(JsonNode node, String prop, boolean defaultValue) throws JsonFormatException { if (node.get(prop) == null) { return defaultValue; } if (node.get(prop).isNull()) { return null; } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a boolean property: " + prop); } return node.get(prop).getBooleanValue(); }
public static Boolean getBoolean(JsonNode node, String prop, boolean defaultValue) throws JsonFormatException { if (node.get(prop) == null) { return defaultValue; } if (node.get(prop).isNull()) { return null; } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a boolean property: " + prop); } return node.get(prop).getBooleanValue(); }
public static Boolean getBoolean(JsonNode node, String prop) throws JsonFormatException { if (node.get(prop) == null) { throw new JsonFormatException("Missing required property: " + prop); } if (node.get(prop).isNull()) { return null; } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a boolean property: " + prop); } return node.get(prop).getBooleanValue(); }
public static boolean getBoolean(JsonNode node, String prop) throws JsonFormatException { if (node.get(prop) == null) { throw new JsonFormatException("Missing required property: " + prop); } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a string property: " + prop); } return node.get(prop).getBooleanValue(); }
public static Boolean getBoolean(JsonNode node, String prop) throws JsonFormatException { if (node.get(prop) == null) { throw new JsonFormatException("Missing required property: " + prop); } if (node.get(prop).isNull()) { return null; } if (!node.get(prop).isBoolean()) { throw new JsonFormatException("Not a boolean property: " + prop); } return node.get(prop).getBooleanValue(); }
public boolean isLazyLoad() { JsonNode target = descriptorNode.path(ATT_LAZYLOAD); return !target.isMissingNode() ? target.getBooleanValue() : true; }
@Override protected String getTicker(Pair pair) throws IOException { // https://coinmate.io/api/ticker?currencyPair=BTC_USD JsonNode node = readJsonFromUrl("https://coinmate.io/api/ticker?currencyPair=" + pair.getCoin() + "_" + pair.getExchange()); if(node.get("error").getBooleanValue()) throw new IOException(node.get("errorMessage").asText()); return parseTicker(node, pair); }
private Boolean getBoolean(final String path, final JsonNode node) { if (representsNull(node)) { return null; } checkValue(path, node, "a boolean"); if (!node.isBoolean()) { throw new IllegalArgumentException(formatExMsg(path, "is not a boolean")); } return node.getBooleanValue(); }
private Boolean getBoolean(final String path, final JsonNode node) { if (representsNull(node)) { return null; } checkValue(path, node, "a boolean"); if (!node.isBoolean()) { throw new IllegalArgumentException(formatExMsg(path, "is not a boolean")); } return node.getBooleanValue(); }
public boolean isActive() { JsonNode gauges = getGauges(root); JsonNode obj = getValue(gauges.findPath(sentryService + ".is_active")); return obj.getBooleanValue(); } }