pip install simplejson python import simplejson as json python import simplejson as json json_str = '{"name": "John", "age": 30, "city": "New York"}' data = json.loads(json_str) print(data) {'name': 'John', 'age': 30, 'city': 'New York'} python import simplejson as json data = { "name": "John", "age": 30, "city": "New York" } json_str = json.dumps(data) print(json_str) {"name": "John", "age": 30, "city": "New York"}


上一篇:
下一篇:
切换中文