Serhiy Storchaka added the comment: Jsonlines is an external to JSON format. You should split the data on lines and pass every line to the JSON parser separately. The same you should do with json.tool.
$ echo -e '{"ingredients":["frog", "water", "chocolate", "glucose"]}\n{"ingredients":["chocolate","steel bolts"]}' | while read -r line; do echo -n "$line" | python -m json.tool; done { "ingredients": [ "frog", "water", "chocolate", "glucose" ] } { "ingredients": [ "chocolate", "steel bolts" ] } ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31553> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com