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 liad100
Recipients liad100
Date 2018-08-13.11:34:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za>
In-reply-to
Content
The list of arguments of json.dump() can be seen here: https://docs.python.org/2/library/json.html

Notice that there is no way to make compression.

For example pandas allows you to do:
        df.to_csv(path_or_buf=file_name, index=False, encoding='utf-8',
                  compression='gzip',
                  quoting=QUOTE_NONNUMERIC)

I want to be able to compress when I do:
    with open('products.json', 'w') as outfile:
        json.dump(data, outfile, sort_keys=True)


Please add the ability to compress using json.dump()
History
Date User Action Args
2018-08-13 11:34:23liad100setrecipients: + liad100
2018-08-13 11:34:23liad100setmessageid: <1534160063.78.0.56676864532.issue34393@psf.upfronthosting.co.za>
2018-08-13 11:34:23liad100linkissue34393 messages
2018-08-13 11:34:23liad100create