How to read or get .json file from ipfs using ipfshttpclient (python)

I am using ipfshttpclient to connect with ipfs and add .json file but when i run client.get(hash) it returns none and when i run client.cat(hash) it returns "TypeError: Object of type bytes is not JSON serializable "
my code

comment=request.form[‘comment’]
block_number=request.form[‘bn’]
print(block_number)
post_record={‘comment’:comment}
with open(‘comment.json’, ‘w’) as outfile:
json.dump(post_record, outfile)
client = ipfshttpclient.connect()
res=client.add(‘comment.json’)
block_record_list[0][int(block_number)]=“https://ipfs.io/ipfs/”+ res[“Hash”]
response=block_record_list[0][int(block_number)]
response=client.cat(res[“Hash”])
return jsonify(response), 200

Hey @Mandal, and welcome to the Infura community!

With this, it looks like you are potentially creating bytes strings on your own in your code. I would suggest figuring out which variables are type bytes and transform those into Unicode (json.dumps(x.decode("utf-8"))).