I have a list of dicts:
for item in list:
listDicts.append(item.AsDict())
How convert listDicts to json string, using simplejson ? Making the list each dictionary will be an object in JSON.
I have a list of dicts:
for item in list:
listDicts.append(item.AsDict())
How convert listDicts to json string, using simplejson ? Making the list each dictionary will be an object in JSON.
Copyright © 2021 Jogjafile Inc.
Have you tried
json.dumps(listDicts)
? It comes out of the box. I'm not sure what simplejson would buy you; in fact, I think they're the same thing.