8000 Added docs for JsonResponse::fromJsonString by javiereguiluz · Pull Request #7204 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Added docs for JsonResponse::fromJsonString #7204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fixed the versionadded number
  • Loading branch information
javiereguiluz committed Dec 10, 2016
commit fbfe3ed737cee119338d7ca6e051e3cef788e755
2 changes: 1 addition & 1 deletion components/http_foundation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ class, which can make this even easier::
$response = JsonResponse::fromJsonString('{ "data": 123 }');

.. versionadded:: 3.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong version

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, if it is in 3.2, the wrong number is on the next line saying 3.3 (I haven't checked the code to know which version included it)

Copy link
Member
@xabbuh xabbuh Dec 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ``JsonResponse::fromJsonString()`` method was added in Symfony 3.3.
The ``JsonResponse::fromJsonString()`` method was added in Symfony 3.2.

The ``JsonResponse`` class sets the ``Content-Type`` header to
``application/json`` and encodes your data to JSON when needed.
Expand Down
0