27 Aug
2019
27 Aug
'19
4:34 a.m.
On Tue, 27 Aug 2019 11:20:58 +0200 Richard Musil <risa2000x@gmail.com> 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.