public static Iterator<Inspector> entriesIterator(Inspector inspector) {
        return new Iterator<>() {
            private int current = 0;
            @Override public boolean hasNext() { return current < inspector.entries(); }
            @Override public Inspector next() { return inspector.entry(current++); }
        };
    }
Throws {@link JsonParseException} on invalid JSON.
vespajlib/src/main/java/com/yahoo/slime/SlimeUtils.java