Skip to content

Commit

Permalink
Added documentation explaining that the JSON encoder used in the json…
Browse files Browse the repository at this point in the history
…ify function is from Flask.json_encoder_class.
  • Loading branch information
jfinkels committed Jun 25, 2012
1 parent 5568bb6 commit 989a7a7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions flask/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,20 @@ def get_current_user():
"id": 42
}
This function will use the JSON encoder specified by the
:attr:`Flask.json_encoder_class` attribute (which is :class:`JSONEncoder`
by default).
This requires Python 2.6 or an installed version of simplejson. For
security reasons only objects are supported toplevel. For more
information about this, have a look at :ref:`json-security`.
.. versionadded:: 0.2
.. versionchanged:: 0.9
Now uses the JSON encoder specified by :attr:`Flask.json_encoder_class`
on :data:`flask.current_app`.
"""
if __debug__:
_assert_have_json()
Expand Down

0 comments on commit 989a7a7

Please sign in to comment.