for (long i = offset; i < c.children.size(); i++) {
if (maxChildNodes-- <= 0) {
break;
}
String name = PathUtils.getName(c.children.get((int) i));
json.key(name).object().endObject();
}
if (c.hasMore) {
// TODO use a better way to notify there are more children
json.key(":childNodeCount").value(Long.MAX_VALUE);
} else {