On Tue, 15 Sep 2020 at 18:10, Wes Turner <wes.tur...@gmail.com> wrote: > > json.loads and json.dumps exist only because there was no way to distinguish > between a string containing JSON and a file path string. > (They probably should've been .loadstr and .dumpstr, but it's too late for > that now)
Well, if you see the code of msutils.jsonLoad I linked before, it does a simple try. Not very elegant, but effective. _______________________________________________ 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/2LSXRUEBP2MEE7M3EHCHIGGI2NZ3NROL/ Code of Conduct: http://python.org/psf/codeofconduct/