import requests
import json
from typing import OrderedDict


def metadata(url):
    """Fetch JSON metadata from url."""
    req = requests.get(url)
    return json.loads(req.content.decode('utf-8'), object_pairs_hook = OrderedDict)