title: Reading a .json file in static folder
body: <p>I'm trying to read a <code>.json</code> file from within my Flask application using:</p>
  
  <pre><code>def renderblog():
      with open(url_for("static", filename="blogs.json")) as blog_file:
          data = json.load(blog_file)
  </code></pre>
  
  <p>However I get the error:</p>
  
  <pre><code>FileNotFoundError: [Errno 2] No such file or directory: '/static/blogs.json'
  </code></pre>
  
  <p>Now I know for a fact that the directory exists within my project structure, but I have no idea why I'm getting this error. Any ideas? Is there a specific way to retrieve <code>.json</code> in Flask? </p>