Skip to content

Dronehub/flask-minijson

Repository files navigation

flask-minijson

Build Status Test Coverage Issue Count PyPI PyPI version PyPI PyPI License

An extension for Flask to allow clients to submit data using the minijson codec by providing a Content-Type header of application/minijson.

flask-json is required to be initialized before FlaskMiniJSON, in such a way:

from flask_minijson import FlaskMiniJSON

app = Flask(__name__)
FlaskJSON(app)
FlaskMiniJSON(app)

And you use it like this:

@app.route('/v1', methods=['POST'])
def endpoint():
    json = request.get_json()

if normal JSON is passed, it will be recognized. If minijson is sent by the client, it will be recognized as well.

About

An extension for Flask to allow clients to submit data using the application/minijson codec

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages