@Test public void listAt() { ObjectNode node = newObject(); node.putArray("foo").add(1).add(2).add(3); Iterable<? extends JsonNode> value = Selectors.listAt(node, FOO_FIELD); assertThat(value, contains(new IntNode(1), new IntNode(2), new IntNode(3))); }
public static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyList(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a list"); } return node; }
Selectors { public static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyList(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a list"); } return node; } }
Selectors { public static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyList(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a list"); } return node; }  }
Selectors { public static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyList(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a list"); } return node; }  static String textAt(JsonNode node, JsonPointer pointer); static int integerAt(JsonNode node, JsonPointer pointer); static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer); static List<String> textListAt(JsonNode node, JsonPointer pointer); static Map<String, String> propertiesAt(JsonNode node, JsonPointer pointer); }
Selectors { public static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer) { node = node.at(pointer); if (node.isMissingNode()) { return Collections.emptyList(); } if (!node.isArray()) { throw new WrongTypeException(pointer, "not a list"); } return node; }  static String textAt(JsonNode node, JsonPointer pointer); static int integerAt(JsonNode node, JsonPointer pointer); static Iterable<? extends JsonNode> listAt(JsonNode node, JsonPointer pointer); static List<String> textListAt(JsonNode node, JsonPointer pointer); static Map<String, String> propertiesAt(JsonNode node, JsonPointer pointer);  }