Skip to content

Commit 6da94e5

Browse files
committed
docs: outline the difference between JSON and form parsers. Fix #7633
1 parent 3578683 commit 6da94e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

docs/api-guide/parsers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Or, if you're using the `@api_view` decorator with function based views.
7373

7474
## JSONParser
7575

76-
Parses `JSON` request content.
76+
Parses `JSON` request content. `request.data` will be populated with a dictionary of data.
7777

7878
**.media_type**: `application/json`
7979

docs/api-guide/requests.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ REST framework's Request objects provide flexible request parsing that allows yo
2323

2424
* It includes all parsed content, including *file and non-file* inputs.
2525
* It supports parsing the content of HTTP methods other than `POST`, meaning that you can access the content of `PUT` and `PATCH` requests.
26-
* 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.
26+
* 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].
2727

2828
For more details see the [parsers documentation].
2929

@@ -136,5 +136,7 @@ Note that due to implementation reasons the `Request` class does not inherit fro
136136

137137
[cite]: https://groups.google.com/d/topic/django-developers/dxI4qVzrBY4/discussion
138138
[parsers documentation]: parsers.md
139+
[JSON data]: parsers.md#jsonparser
140+
[form data]: parsers.md#formparser
139141
[authentication documentation]: authentication.md
140142
[browser enhancements documentation]: ../topics/browser-enhancements.md

0 commit comments

Comments
 (0)