import json obj = dict(name='小明', age=20)s = json.dumps(obj, ensure_ascii=True)print(s) # your code goes here
Standard input is empty
{"name": "\u5c0f\u660e", "age": 20}
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!