import ast ast.literal_eval(str(hdf))
# how to load a string to json import ast jsonobj = ast.literal_eval(str(hdf))