def format_data(obj):
    """ Return the information for the special field 'data', which return various
        information, depending on type. Files return their sha256 hashsum, links
        their symlink target.
    """
    if obj.objtype == 'f' and obj.size:
        return obj.hashsum()
    elif obj.objtype == 'l':
        return obj.link
    return None
