On 6/10/2020 11:00 AM, Chris Angelico wrote:
On Thu, Jun 11, 2020 at 12:45 AM Dan Sommers 2QdxY4RzWzUUiLuE@potatochowder.com wrote:
If you control both the producers and the consumers, and they're both written in Python, then you may as well use pickle and base64 (and an HMAC!) to convert your python data to an opaque ASCII string and just transmit that string. Why bother with JSON and all of its verbosity and restrictions in the first place?
If interoperability is a concern, then how much does this sort of thing complicate your JSON and all of the other producers/consumers? Will their applications, standard libraries, and best practices "just work"?
What if it's to be produced and consumed by your app (so, no interoperability), but you want it to be human-readable and human-editable? JSON is pretty good for that.
True, but I don't think the stdlib needs to cater to that requirement when there are hooks to write your own customizations.