[issue40623] JSON streaming

paul rubin report at bugs.python.org
Thu May 14 07:17:58 EDT 2020


paul rubin <phr-pythonbugs at nightsong.com> added the comment:

It's coming back to me, I think I used the no-separator format because I made the multi-document input files by using json.dump after opening the file in append mode.  That seems pretty natural.  I figured the wikipedia article and the json.tool patch just released were evidence that there is interest in this.  The approach of writing newlines between the docs and iterating through lines is probably workable though.  I don't know why I didn't do that before.  I might not have been sure that json docs never contain newlines.

Really it would be nice if json.load could read in anything that json.dump could write out (including with the indent parameter), but that's potentially more complicated and might conflict with the json spec.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40623>
_______________________________________


More information about the Python-bugs-list mailing list