I use Python 3.7.1.
What I am looking for is to save transformed/treated object in a file, then open this file in a any text editor.
JSON
is not what I am looking for. "JSON
is a text serialization format (it outputs unicode text, although most of the time it is then encoded to utf-8), while pickle
is a binary serialization format". It looks perfect but my problem is JSON
has no reason to support a namedtuple
object. As far as I know it supports dict
,list
,and so on, but not this kind of objects.
Besides, as you read pickle
makes binary serialization and this is unreadable by any text editor.
So, I want to know if there are other ways of human readable serialization of python's object, hoping this is not to complicated to implement.