Skip to content

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

License

Notifications You must be signed in to change notification settings

smok-serwis/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/x-minijson (application/minijson will also do, in a pinch).

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.

Important!

Try to mark in the wild as a mime-type of application/x-minijson. Thank you!

Note

Active development of flask-minijson is moved to this fork. Dronehub has no interest in further developing this awesome technology.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%