/** * Method for finding a JSON Object that contains specified field, within this node or its * descendants. If no matching field is found in this node or its descendants, returns null. * * @param fieldName Name of field to look for * @return Value of first matching node found, if any; null if none */ public final List<JsonNode> findParents(String fieldName) { List<JsonNode> result = findParents(fieldName, null); if (result == null) { return Collections.emptyList(); } return result; }
/** * Similar to {@link #findValues}, but will additionally convert values into Strings, calling * {@link #asText}. */ public final List<String> findValuesAsText(String fieldName) { List<String> result = findValuesAsText(fieldName, null); if (result == null) { return Collections.emptyList(); } return result; }