The Nomadic Coder writes:

 > This came out personal frustration, as I use this 3 line function
 > very, very often, and the whole community does.

I don't deny your experience, but mine differs.  Most JSON I get as
single objects arrives as strings (eg as an attribute on an HTTP
response object), not in files or file-like objects.  Most JSON I get
from file-like objects comes as streams of objects, rather than as
single objects, which means that to use the json module I have to do
something a little more complicated (sometimes quite a bit more
complicated) than a 3-line function.  The issue of handling such
streams has come up in the past.

 > Still learning-to-navigate what's accepted here and what's not :)

On this list, you can ask as long as you don't get pissy about not
receiving.

See Naoki Inada's post for why this might be a good idea even though
it's a three-line function.  It's not open and shut (for one thing, on
most modern systems the system default encoding is already UTF-8), but
it definitely is food for thought.

Also Serhiy's post on issues specific to working with files and json.
So this is a richer learning experience than you might have thought!

_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/MX3ANN4ZJGVT4CCTN6UWR4XLAGJFEWFU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to