Could it help?
for obj in detected_objects: obj["box"] = [int(coord) for coord in obj["box"]] obj["distance"] = float(obj["distance"])