Correcting json.dumps call