@Test public void missingNode() throws JsonProcessingException, IOException { String json = "{ \"a\": { \"b\": {} } }"; JsonNode node = new ObjectMapper().readTree(json); underTest = new PartitionNodeFunction(KeyPathParser.parse("$.a.b.c")); JsonNode result = underTest.apply(node); assertThat(result, is(MissingNode.getInstance())); }
@Override public JsonNode apply(JsonNode node) { return node.at(pointer); }
PartitionNodeFunction implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode node) { return node.at(pointer); } }
PartitionNodeFunction implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode node) { return node.at(pointer); } PartitionNodeFunction(Path path); }
PartitionNodeFunction implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode node) { return node.at(pointer); } PartitionNodeFunction(Path path); @Override JsonNode apply(JsonNode node); }
PartitionNodeFunction implements Function<JsonNode, JsonNode> { @Override public JsonNode apply(JsonNode node) { return node.at(pointer); } PartitionNodeFunction(Path path); @Override JsonNode apply(JsonNode node);  }