I think this maybe needs to be `json.dumps` instead of `str`?