uk.co.mruoc.json.mask.JsonPathFactory Maven / Gradle / Ivy
package uk.co.mruoc.json.mask;
import com.jayway.jsonpath.JsonPath;
import java.util.Arrays;
import java.util.Collection;
import java.util.stream.Collectors;
public interface JsonPathFactory {
static Collection toJsonPaths(String... paths) {
return toJsonPaths(Arrays.asList(paths));
}
static Collection toJsonPaths(Collection paths) {
return paths.stream().map(JsonPath::compile).collect(Collectors.toList());
}
}