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 Eric Moyer, rhettinger, serhiy.storchaka
Date 2017-09-23.04:58:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506142728.97.0.0178421213793.issue31553@psf.upfronthosting.co.za>
In-reply-to
Content
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"
    ]
}
History
Date User Action Args
2017-09-23 04:58:48serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, Eric Moyer
2017-09-23 04:58:48serhiy.storchakasetmessageid: <1506142728.97.0.0178421213793.issue31553@psf.upfronthosting.co.za>
2017-09-23 04:58:48serhiy.storchakalinkissue31553 messages
2017-09-23 04:58:48serhiy.storchakacreate