Escaped characters on Loki logs using python client

I’ve been having trouble with escaped characters on Loki stream considering my logging is in serialized format over a Python client. As much as I try resolving it with common python methods under json (like json.dumps) before I post my parsed stream data onto Loki API, it somehow keeps escaping characters. A few common escaped characters are - \n, ", \t.

I am using python requests to compile the data and send the request. The payload is a dictionary where I’ve attempted force escape of those characters but somehow the Log QL query ends up showing a JSONParseError since few characters are escaped.