AbstractExpressionEvaluator implements ExpressionEvaluator { protected boolean isNodeEmpty(JsonNode json) { if (json.isArray()) { return isListEmpty((ArrayNode) json); } else if (json.isObject()) { return isObjectEmpty((ObjectNode) json); } else { return isEmptyText(json); } }  @Override Object evaluateLiteralExpression(String rawExpression, String className, List<String> genericClasses); @Override boolean evaluateUnaryExpression(String rawExpression, Object resultValue, Class<?> resultClass);  }
@Test public void isNodeEmpty() { ObjectNode objectNode = new ObjectNode(factory); assertTrue(expressionEvaluatorLocal.isNodeEmpty(objectNode)); objectNode.set("empty array", new ArrayNode(factory)); assertTrue(expressionEvaluatorLocal.isNodeEmpty(objectNode)); objectNode.set("key", new TextNode(VALUE)); assertFalse(expressionEvaluatorLocal.isNodeEmpty(objectNode)); ArrayNode arrayNode = new ArrayNode(factory); assertTrue(expressionEvaluatorLocal.isNodeEmpty(arrayNode)); arrayNode.add(new TextNode(VALUE)); assertFalse(expressionEvaluatorLocal.isNodeEmpty(arrayNode)); assertTrue(expressionEvaluatorLocal.isNodeEmpty(new TextNode(""))); assertTrue(expressionEvaluatorLocal.isNodeEmpty(new TextNode(null))); assertFalse(expressionEvaluatorLocal.isNodeEmpty(new TextNode(VALUE))); }