Skip to content
Snippets Groups Projects
Commit 1ae7139f authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

fix travis

parent 109ff5e3
No related branches found
No related tags found
No related merge requests found
# flask-minijson flask-minijson
==============
[![Build Status](https://travis-ci.com/Dronehub/flask-minijson.svg)](https://travis-ci.com/Dronehub/flask-minijson)
[![Test Coverage](https://api.codeclimate.com/v1/badges/34b392b61482d98ad3f0/test_coverage)](https://codeclimate.com/github/Dronehub/flask-minijson/test_coverage)
[![Issue Count](https://codeclimate.com/github/Dronehub/flask-minijson/badges/issue_count.svg)](https://codeclimate.com/github/Dronehub/flask-minijson)
[![PyPI](https://img.shields.io/pypi/pyversions/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)
[![PyPI version](https://badge.fury.io/py/flask-minijson.svg)](https://badge.fury.io/py/flask-minijson)
[![PyPI](https://img.shields.io/pypi/implementation/flask-minijson.svg)](https://pypi.python.org/pypi/flask-minijson)
An extension for Flask to allow clients to submit data using the application/minijson codec 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: flask-json is required to be initialized before `FlaskMiniJSON`, in such a way:
...@@ -10,3 +19,13 @@ app = Flask(__name__) ...@@ -10,3 +19,13 @@ app = Flask(__name__)
FlaskJSON(app) FlaskJSON(app)
FlaskMiniJSON(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
# coding: utf-8 # coding: utf-8
[metadata] [metadata]
version = 2.5a1 version = 0.1
name = flask-minijson name = flask-minijson
long_description = file: README.md long_description = file: README.md
long_description_content_type = text/markdown; charset=UTF-8 long_description_content_type = text/markdown; charset=UTF-8
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment