json.key("rev").value(rev.toString());
if (lastRevision != null) {
json.key("lastRev").value(lastRevision.toString());
}
if (hasChildren) {
json.key("hasChildren").value(hasChildren);
}
if (properties.size() > 0) {
json.key("prop").object();
for (String k : properties.keySet()) {
json.key(k).value(getPropertyAsString(k));