mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
docs: outline the difference between JSON and form parsers. Fix #7633
This commit is contained in:
parent
3578683a69
commit
6da94e5700
|
@ -73,7 +73,7 @@ Or, if you're using the `@api_view` decorator with function based views.
|
|||
|
||||
## JSONParser
|
||||
|
||||
Parses `JSON` request content.
|
||||
Parses `JSON` request content. `request.data` will be populated with a dictionary of data.
|
||||
|
||||
**.media_type**: `application/json`
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ REST framework's Request objects provide flexible request parsing that allows yo
|
|||
|
||||
* It includes all parsed content, including *file and non-file* inputs.
|
||||
* It supports parsing the content of HTTP methods other than `POST`, meaning that you can access the content of `PUT` and `PATCH` requests.
|
||||
* It supports REST framework's flexible request parsing, rather than just supporting form data. For example you can handle incoming JSON data in the same way that you handle incoming form data.
|
||||
* It supports REST framework's flexible request parsing, rather than just supporting form data. For example you can handle incoming [JSON data] similarly to how you handle incoming [form data].
|
||||
|
||||
For more details see the [parsers documentation].
|
||||
|
||||
|
@ -136,5 +136,7 @@ Note that due to implementation reasons the `Request` class does not inherit fro
|
|||
|
||||
[cite]: https://groups.google.com/d/topic/django-developers/dxI4qVzrBY4/discussion
|
||||
[parsers documentation]: parsers.md
|
||||
[JSON data]: parsers.md#jsonparser
|
||||
[form data]: parsers.md#formparser
|
||||
[authentication documentation]: authentication.md
|
||||
[browser enhancements documentation]: ../topics/browser-enhancements.md
|
||||
|
|
Loading…
Reference in New Issue
Block a user