@Test public void testGetMissingPathIsNullOrThrows(){ try { Object obj = JsonFunctions.getPath("$.europe.spain.malaga").apply(europeMap()); Assert.assertNull(obj); } catch (PathNotFoundException e) { } }
public static <T> Function<JsonElement,T> getPath(final String path) { return new GetPath<T>(path); }
JsonFunctions { public static <T> Function<JsonElement,T> getPath(final String path) { return new GetPath<T>(path); } }
JsonFunctions { public static <T> Function<JsonElement,T> getPath(final String path) { return new GetPath<T>(path); } private  JsonFunctions(); }
JsonFunctions { public static <T> Function<JsonElement,T> getPath(final String path) { return new GetPath<T>(path); } private  JsonFunctions(); static Function<String, JsonElement> asJson(); static Function<JsonElement, List<T>> forEach(final Function<JsonElement, T> func); static Function<JsonElement, JsonElement> walk(String elementOrDotSeparatedElements); static Function<JsonElement, JsonElement> walk(final String... elements); static Function<JsonElement, JsonElement> walk(final Iterable<String> elements); static Function<JsonElement, JsonElement> walkN(@Nullable String elements); static Function<JsonElement, JsonElement> walkN(final String... elements); static Function<JsonElement, JsonElement> walkN(final Iterable<String> elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(@Nullable String elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(final String... elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(final Iterable<String> elements); static Function<JsonElement,T> getPath(final String path); static Function<JsonElement, T> cast(final Class<T> expected); static Function<Maybe<JsonElement>, T> castM(final Class<T> expected); static Function<Maybe<JsonElement>, T> castM(final Class<T> expected, final T defaultValue); }
JsonFunctions { public static <T> Function<JsonElement,T> getPath(final String path) { return new GetPath<T>(path); } private  JsonFunctions(); static Function<String, JsonElement> asJson(); static Function<JsonElement, List<T>> forEach(final Function<JsonElement, T> func); static Function<JsonElement, JsonElement> walk(String elementOrDotSeparatedElements); static Function<JsonElement, JsonElement> walk(final String... elements); static Function<JsonElement, JsonElement> walk(final Iterable<String> elements); static Function<JsonElement, JsonElement> walkN(@Nullable String elements); static Function<JsonElement, JsonElement> walkN(final String... elements); static Function<JsonElement, JsonElement> walkN(final Iterable<String> elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(@Nullable String elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(final String... elements); static Function<Maybe<JsonElement>, Maybe<JsonElement>> walkM(final Iterable<String> elements); static Function<JsonElement,T> getPath(final String path); static Function<JsonElement, T> cast(final Class<T> expected); static Function<Maybe<JsonElement>, T> castM(final Class<T> expected); static Function<Maybe<JsonElement>, T> castM(final Class<T> expected, final T defaultValue);  }