@NonNull
    private static Pair<List<Geocache>, Boolean> parseCaches(final ObjectNode response) {
        try {
            final JsonNode moreNode = response.path("more");
            final boolean more = moreNode != null && moreNode.isBoolean() && moreNode.asBoolean();

            // Check for empty result
            final JsonNode results = response.path("results");
            if (!results.isObject()) {
                return new Pair<>(Collections.emptyList(), more);
            }

            // Get and iterate result list
            final List<Geocache> caches = new ArrayList<>(results.size());
            for (final JsonNode cache : results) {
                caches.add(parseSmallCache((ObjectNode) cache));
            }
            return new Pair<>(caches, more);
        } catch (ClassCastException | NullPointerException e) {
            Log.e("OkapiClient.parseCachesResult", e);
        }
        return new Pair<>(Collections.emptyList(), false);
    }
returns list of parsed geocaches (left) and a floag indicating whether there are more results on serer (right)
main/src/main/java/cgeo/geocaching/connector/oc/OkapiClient.java