06.08.20 11:03, Kazantcev Andrey пише:
> JSON serialization used in many different libraries without the ability for 
> configuration (Example 
> https://github.com/aio-libs/aioredis/blob/8a207609b7f8a33e74c7c8130d97186e78cc0052/aioredis/commands/pubsub.py#L18).
>  Propose to add something like the context in the decimal module, wIch will 
> contain all global configs for dump and load functions.

Changing global defaults is a bad idea, because it would break all
libraries which use the json module.

As for a local context which incorporates configuration for serializing
and deserializing, you already have two context classes. They are called
JSONEncoder and JSONDecoder.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/IWLKGHH6PRA7KOJWAVQPCT3ILOAM4K25/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to