I'm trying to build a simple convertor for any object to byte array in Python. I took a look on pickle but it only works creating a file and this is not what I need. I also checked json.dump but some objects need a serializer to be dumped.
I need a convertor that keeps my object in memory and can convert any object to byte array.