A Flask extension to allow client's to submit data using the MiniJSON codec
Project description
flask-minijson
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask-minijson-0.4.tar.gz
(3.6 kB
view details)
Built Distribution
File details
Details for the file flask-minijson-0.4.tar.gz
.
File metadata
- Download URL: flask-minijson-0.4.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286688303924d7daaa16f8ee773366cb71209be8202a107e590348b59bf3d2bc |
|
MD5 | 44a1ed2dc316e19bc6f540b1069e8d00 |
|
BLAKE2b-256 | a5508335e142c189d628ca043358eab24eabc822eb7eb05901b26d818fe7ade3 |
File details
Details for the file flask_minijson-0.4-py3-none-any.whl
.
File metadata
- Download URL: flask_minijson-0.4-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aee2bec1e8e51e39369c4d58c35e676a9b0f9479639e9b3e2ec60f573c3c73a |
|
MD5 | 2f5c2bca71586cfc5b2a275dc769bd8f |
|
BLAKE2b-256 | e8508aaf0a4f66f49390028a9ec76084e279846e03ba01f4e10ab06167163bbb |