[issue34393] json.dumps - allow compression

liad report at bugs.python.org
Tue Aug 14 09:16:41 EDT 2018


liad <liad at mailinator.com> added the comment:

True there are endless versions of compression just like there are endless version of file formats. Still there are some build-ins like conversion from string to json. For example you don't support of json to orc file. Same argument could have been raise here : how would we choose which conversions to also? Still a choice has been made and some basic conversion behavior is supported.

You are claiming that it's all or nothing which I don't think is the right approach.

Many are now moving their storage into cloud platforms. The storage is as it sound - storage. It doesn't offer any programming service what you stream is what you will have. Streaming huge files without compression = bleeding money for no reason. Saving the files to disk, compress them and then upload them might be very slow and also the idea is having machine with big memory and low storage - if you have to save huge files localy you'll also need big storage which costs more money.

Regarding google there is a pending request for who chooses to use GoogleCloudPlatform package but not all use that. 

https://github.com/GoogleCloudPlatform/google-cloud-python/issues/5791

Not to mention that there are dozes of other service providers. So even if Google will support it - this doesn't give answer to storage service providers 

I still claim that this is a basic legit request and can be handled by the json.dump() function.

gzip is fine. It also supported by pandas extension and is well known.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34393>
_______________________________________


More information about the Python-bugs-list mailing list