import json obj = {"a": 1, "b": 2} encodedjson = json.dumps(obj) # '{"a": 1, "b": 2}' decodejson = json.loads(encodedjson) # {"a": 1, "b": 2}
import json obj = {"a": 1, "b": 2} encodedjson = json.dumps(obj) # '{"a": 1, "b": 2}' decodejson = json.loads(encodedjson) # {"a": 1, "b": 2}