This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ZeD, bob.ippolito, ezio.melotti, lukasz.langa, rhettinger, serhiy.storchaka
Date 2021-12-11.10:59:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639220368.51.0.305452481571.issue45929@roundup.psfhosted.org>
In-reply-to
Content
The current implementation allows for the final character of the input to be a newline. It does not allow double newlines. In the original example 

   echo -e '{"foo":1}\n{"bar":2}\n'

the echo command adds a newline to the output (which already contains the trailing newline), so the result ends with two newlines. Use option -n to disable adding newline in echo.

I afraid that if we add support of empty lines, soon we will get requests for supporting comments, encoding cookies, single-quote strings, non-quoted keys, hexadecimal integers and other possible JSON extensions.
History
Date User Action Args
2021-12-11 10:59:28serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, bob.ippolito, ezio.melotti, ZeD, lukasz.langa
2021-12-11 10:59:28serhiy.storchakasetmessageid: <1639220368.51.0.305452481571.issue45929@roundup.psfhosted.org>
2021-12-11 10:59:28serhiy.storchakalinkissue45929 messages
2021-12-11 10:59:28serhiy.storchakacreate