@app.route('/data/events.json')
def get_events():
    with open(path.join(data_folder, 'events.xml'), encoding='UTF-8') as events_file:
        events = xmltodict.parse(events_file.read())['events']['event']
        return Response(json.dumps(events, cls=DateAwareEncoder), mimetype='application/json')
@app.route('/data/events.json')
def get_events():
    with open(path.join(data_folder, 'events.xml'), encoding='UTF-8') as events_file:
        events = xmltodict.parse(events_file.read())['events']['event']
        return Response(json.dumps(events, cls=DateAwareEncoder), mimetype='application/json')