@Test public void binaryNode() throws Exception { JsonNode jsonNode = underTest.apply(BinaryNode.valueOf(new byte[] { 1, 0, 1, 2 })); assertThat(jsonNode.isBinary(), is(true)); assertThat(jsonNode.binaryValue().length, is(0)); }
@Override public JsonNode apply(JsonNode value) { if (value instanceof TextNode) { return TextNode.valueOf(replacer.replace(value.asText())); } else if (value instanceof BinaryNode) { return BinaryNode.valueOf(new byte[0]); } else { return value; } }
JsonNodePiiReplacer implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode value) { if (value instanceof TextNode) { return TextNode.valueOf(replacer.replace(value.asText())); } else if (value instanceof BinaryNode) { return BinaryNode.valueOf(new byte[0]); } else { return value; } } }
JsonNodePiiReplacer implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode value) { if (value instanceof TextNode) { return TextNode.valueOf(replacer.replace(value.asText())); } else if (value instanceof BinaryNode) { return BinaryNode.valueOf(new byte[0]); } else { return value; } }  }
JsonNodePiiReplacer implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode value) { if (value instanceof TextNode) { return TextNode.valueOf(replacer.replace(value.asText())); } else if (value instanceof BinaryNode) { return BinaryNode.valueOf(new byte[0]); } else { return value; } }  @Override JsonNode apply(JsonNode value); }
JsonNodePiiReplacer implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode value) { if (value instanceof TextNode) { return TextNode.valueOf(replacer.replace(value.asText())); } else if (value instanceof BinaryNode) { return BinaryNode.valueOf(new byte[0]); } else { return value; } }  @Override JsonNode apply(JsonNode value);  }