On Tue, 27 Aug 2019 11:20:58 +0200
Richard Musil <[email protected]> wrote:
> 
> To resolve the bpo issue with numpy, one would need to implement complete
> custom serialization (1) or simply convert numpy number types into Python
> number types.

Yes, both are possible and both could even be implemented.  For Numpy
it's enough to be able to return the equivalent Python integer and let
the json module do the actual serialization.

You can't really ask people to write a custom encoder or object
function, though.  That's not very user-friendly.  A third-party type
should be able to say how it serializes.

Regards

Antoine.

_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/U3GP47M3TS2PQPDFMYPNGJVHVAQRJPBQ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to