diff --git a/README.md b/README.md index 82ef322952cb29e793fc90a6b6ae0342cb726570..6e3e217a3848c380f7f3c8f0359af899adca643d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,13 @@ -# flask-minijson +flask-minijson +============== + +[](https://travis-ci.com/Dronehub/flask-minijson) +[](https://codeclimate.com/github/Dronehub/flask-minijson/test_coverage) +[](https://codeclimate.com/github/Dronehub/flask-minijson) +[](https://pypi.python.org/pypi/flask-minijson) +[](https://badge.fury.io/py/flask-minijson) +[](https://pypi.python.org/pypi/flask-minijson) + An extension for Flask to allow clients to submit data using the application/minijson codec flask-json is required to be initialized before `FlaskMiniJSON`, in such a way: @@ -10,3 +19,13 @@ app = Flask(__name__) FlaskJSON(app) FlaskMiniJSON(app) ``` + +And you use it like this: + +```python +@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 diff --git a/setup.cfg b/setup.cfg index 349e4946142e2aa8a630af798abb34c4c331120a..b8e965c4bbf2bfba4f81ffadc5742d08bab0eeb8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ # coding: utf-8 [metadata] -version = 2.5a1 +version = 0.1 name = flask-minijson long_description = file: README.md long_description_content_type = text/markdown; charset=UTF-8