I hope to use the dictionary load by json file. However, each item contains the character 'u'. I need to remove the 'u's.
I tried dumps, but it does not work.
import ast
import json
data= {u'dot',
u'dog',
u'fog',
u'eeee'}
res = eval(json.dumps(data))
print res
I hope to get: { 'dot', 'dog', 'fog, 'eeee' }
But the error is:
TypeError: set([u'eeee', u'fog', u'dog', u'dot']) is not JSON serializable