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 bob.ippolito, enedil, rhettinger, ronron, serhiy.storchaka
Date 2018-08-30.04:26:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535603164.7.0.56676864532.issue34529@psf.upfronthosting.co.za>
In-reply-to
Content
This format is known as JSON Lines: http://jsonlines.org/. Its support in the user code is trivial -- just one or two lines of code.

Writing:

    for item in items:
        json.dump(item, file)

or

    jsondata = ''.join(json.dumps(item) for item in items)

Reading:

    items = [json.loads(line) for line in file]

or

    items = [json.loads(line) for line in jsondata.splitlines()]

See also issue31553 and issue34393. I think all these propositions should be rejected.
History
Date User Action Args
2018-08-30 04:26:04serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, bob.ippolito, enedil, ronron
2018-08-30 04:26:04serhiy.storchakasetmessageid: <1535603164.7.0.56676864532.issue34529@psf.upfronthosting.co.za>
2018-08-30 04:26:04serhiy.storchakalinkissue34529 messages
2018-08-30 04:26:04serhiy.storchakacreate