class QueryParser {

	private List<?> stats(final JsonObject query) {
		return Optional.ofNullable(query.get("_stats"))

				.filter(v -> !v.equals(JsonValue.NULL))

				.map(v -> v instanceof JsonString ? (JsonString)v : error("_stats is not a string"))
				.map(path -> path(path.getString(), shape))

				.orElse(null);
	}

	  QueryParser(final String base, final Shape shape, final Format<?> format);

}