def json_load(path, encoding='utf-8', **kwargs):
    if path.split(os.path.extsep)[-1] == 'gz':
        f = gzip.open(path)
        s = f.read().decode(encoding)
    else:
        f = open(path)
        s = f.read()

    data = json.loads(s)

    f.close()

    return data
Create a payment event for a subset of order lines
dataset/ETHPy150Open blaze/odo/odo/backends/json.py/json_load--crossover with--dataset/ETHPy150Open django-oscar/django-oscar/src/oscar/apps/dashboard/orders/views.py/OrderDetailView.create_payment_event