API Help

justin walters walters.justin01 at gmail.com
Wed Jun 14 22:51:45 EDT 2017


On Wed, Jun 14, 2017 at 6:00 PM, Ned Batchelder <ned at nedbatchelder.com>
wrote:

> On Wednesday, June 14, 2017 at 7:06:39 PM UTC-4, justin walters wrote:
> > JSON and Python dictionaries have nearly the exact same syntax. That's
> why
> > working with
> > JSON in Python is such a joy! :)
> >
> > You can paste any valid JSON into a Python REPL and it will be
> interpreted
> > as a Python dictionary.
>
> Careful: JSON booleans are true and false, not True and False, and the
> missing
> value is null, not None.  So valid JSON might not be readable as Python.
>
> --Ned.
> --
> https://mail.python.org/mailman/listinfo/python-list
>

Oh! Yep!

I haven't run into this issue because I generally don't run ``eval()`` on
random data from the internet. I usually use either the built in ``json``
module
or ``marshmallow`` if I have a strict schema to conform to.



More information about the Python-list mailing list