I am struggling with how to load a local json in flask.
from flask import Flask, render_template, json, url_for
def taiwan():
json_data = open(url_for('static', filename="data/taiwan.json"))
data = json.load(json_data)
return render_template('taiwan.jade', data=data)
This raises an IOError: No such file or directory: '/static/css/taiwan.json'. But it still exists.
Any suggestions