I'm trying to serialize obj using json (Python). I wish to skip json's unknown type
I know I can add my own encoder, but what I'm interested in is to just skip the unknown type. I don't want to use None
instead. I have tried
icon=QIcon()
arr=["blablal",icon]
str1=simplejson.dumps(arr,skipkeys=True)
I used the skipkeys option to skip the icon object which is unknown type for json but I keep getting TypeError exception. What am I doing wrong?