title: request json validation in the flask
body: <p>Is there some best practice how to validate json request in Flask?
  There is interesting approach in the Flask restful extension but I don't need it in my app.
  I just want to have something like this:</p>
  
  <pre><code>user_schema = {
      'username': email,
      'password': required,
      'age': required
  }
  
  
  @app.route('new_user/', methods=['POST'])
  def new_user():
      validate_json(request.json, user_schema)
  </code></pre>