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