Hey I am trying to import data that is already formatted as JSON data. I am trying to get it to be read in Python so I can use it for a http post request. I have tried saving it as .JSON and .txt and using json.dumps on both files but I'm still getting it in the wrong format. The code is below. I am guessing it is reading in the wrong format as the response from the post is getting an error. However when I use postman for the job, no error.
workingFile = 'D:\\test.json'
file = open(workingFile, 'r')
read = [file.read()]
data = json.dumps(read)
url = 'http://webaddress'
username = 'username'
password = 'password'
requestpost = requests.post(url, data, auth=(username, password))