title: "dict object is not callable" when trying to get value from request.json
body: <p>I am getting the user location with JavaScript and sending the latitude and longitude to the Flask app.  However, I get <code>TypeError: 'dict' object is not callable</code> when I try to get the latitude from <code>request.json</code>.  Why am I getting this error and how do I fix it?</p>
  
  <pre><code>@app.route('/location', methods = ['POST'])
  def location():
      latitude = request.json('latitude')
      longitude = request.json('longitude')
      send_email("myemail@example.com","Location:",str(latitude) + str(longitude))
  </code></pre>
  
  <pre class="lang-javascript prettyprint-override"><code>function showPosition(position) {
      var latitude = position.coords.latitude;
      var longitude = position.coords.longitude;
      $.ajax({
      type: 'POST',
      url: '/location',
      data: JSON.stringify({latitude: latitude, longitude: longitude}),
      contentType: 'application/json;charset=UTF-8'
      });
  }
  </code></pre>