#!/usr/bin/python3 # -*- coding: utf-8 -*- import json data = {'name':'张森','email':'zhangsen@qq.com'} data = json.dumps(data, sort_keys=True, indent=2) data = data.encode('utf-8').decode('unicode_escape') print(data)
#!/usr/bin/python3 # -*- coding: utf-8 -*- import json data = {'name':'张森','email':'zhangsen@qq.com'} data = json.dumps(data, sort_keys=True, indent=2) data = data.encode('utf-8').decode('unicode_escape') print(data)
转载于:https://www.cnblogs.com/37yan/p/8919978.html