def METHOD_NAME(obj):
    """Basic JSON serializer."""
    _files = []
    _index_files = []
    recid = obj.get('pid').pid_value
    files = obj.get('metadata', {}).get('files', [])
    for file in files:
        _file = {
            'checksum': file.get('checksum', ''),
            'size': file.get('size', ''),
            'filename': file.get('key', ''),
            'uri_http': '{}/record/{}/files/{}'.format(
                current_app.config.get('HOST_URI', 'http://opendata.cern.ch'),
                recid,
                file.get('key', ''),
            ),
            'uri_root': file.get('uri', ''),
        }
        if 'index' in file.get('type', ''):
            _index_files.append(_file)
        else:
            _files.append(_file)
    return _files, _index_files