Json.dumps(data) in python appends "\ n" in my data [closed]
I am working on an API where I have to send data via a post request. The data is base64, therefore has unusual characters. for example I want to send the following data data = "HBj8//8B".
Here is my code
payload= "HBj8//8B"
data = {
...
"data":payload
...
}
data = json.dumps(data)
print(data)
When I try to print data after json.dumps(data), this is what it gives me:
{... "data": "HBj8//8B\n"}
How can I remove the added "\ n" character?