JsonUtils { @Deprecated public static boolean nodeExists(Object json, String path) { return !getNode(json, path).isMissingNode(); }  static Node convertToJson(Object source, String label); static Node convertToJson(Object source, String label, boolean lenient); static Node valueToNode(Object source); static Node getNode(Object root, String path); static Node getNode(Object root, Path path); @Deprecated static boolean nodeExists(Object json, String path); static boolean nodeAbsent(Object json, String path, Configuration configuration); static boolean nodeAbsent(Object json, Path path, Configuration configuration); static Object jsonSource(final Object json, final String pathPrefix); static String getPathPrefix(Object json); static Node wrapDeserializedObject(Object source); static Object missingNode();  }
@Test @SuppressWarnings("deprecation") void testNodeExists() { String json = "{\"test\":{\"value\":1}}"; assertTrue(nodeExists(json, "test")); assertTrue(nodeExists(json, "test.value")); assertFalse(nodeExists(json, "test.nonsense")); assertFalse(nodeExists(json, "root")); }