8000 Remove simplejson from guide by pyfisch · Pull Request #1065 · realpython/python-guide · GitHub
[go: up one dir, main page]

Skip to content

Remove simplejson from guide #1065

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

Merged
merged 1 commit into from
Oct 8, 2020
Merged
Changes from all commits
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
26 changes: 1 addition & 25 deletions docs/scenarios/json.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ JSON

.. image:: /_static/photos/33928819683_97b5c6a184_k_d.jpg

The `json <https://docs.python.org/2/library/json.html>`_ library can parse
The `json <https://docs.python.org/3/library/json.html>`_ library can parse
JSON from strings or files. The library parses JSON into a Python dictionary
or list. It can also convert Python dictionaries or lists into JSON strings.

Expand Down Expand Up @@ -46,27 +46,3 @@ You can also convert the following to JSON:

print(json.dumps(d))
'{"first_name": "Guido", "last_name": "Rossum", "titles": ["BDFL", "Developer"]}'


**********
simplejson
**********

The json library was added to Python in version 2.6.
If you're using an earlier version of Python, the
`simplejson <https://simplejson.readthedocs.io/en/latest/>`_ library is
available via PyPI.

simplejson mimics the json standard library. It is available so that developers
that use older versions of Python can use the latest features available in the
json lib.

You can start using simplejson when the json library is not available by
importing simplejson under a different name:

.. code-block:: python

import simplejson as json

After importing simplejson as `json`, the above examples will all work as if you
were using the standard json library.
0