@Override
    public void visit(String name, Object obj) {
        if (obj == null) {
            addLine(name + ": <NULL>");
        } else if (obj instanceof Identifiable) {
            openStruct(name, obj.getClass().getSimpleName());
            ((Identifiable)obj).visitMembers(this);
            closeStruct();
        } else if (obj instanceof String) {
            addLine(name + ": '" + obj + "'");
        } else if (obj.getClass().isArray()) {
            openStruct(name, obj.getClass().getComponentType().getSimpleName() + "[]");
            for (int i = 0, len = Array.getLength(obj); i < len; ++i) {
                visit("[" + i + "]", Array.get(obj, i));
            }
            closeStruct();
        } else if (obj instanceof List) {
            openStruct(name, "List");
            List<?> lst = (List<?>) obj;
            for (int i = 0; i < lst.size(); ++i) {
                visit("[" + i + "]", lst.get(i));
            }
            closeStruct();
        } else {
            addLine(name + ": " + obj);
        }
    }
Obtain the created object string representation. This object should be invoked after the complete object
structure has been visited.

@return object string representation
vespajlib/src/main/java/com/yahoo/vespa/objects/ObjectDumper.java