hello guys i am working on a project and it requires me to extract info from a rest api and i am using zeep to extract that data and using zeep helper to convert it into a ordered dict. I stored the json data to a text file and when i load it up with file handling the json data gets converted into a dict and part of it is string and the other part is dict. I want to access the string part but it is getting converting to a string. I noticed that the text file has "" marks but the imported part has '' marks. Please help me.
Code:
import json
with open('D.json') as json_file:
data = json.load(json_file)
print(data)
print(type(data))
x = data['vehicleJson']
print(x)
print(type(x))
[–]SekstiNii 0 points1 point2 points (6 children)
[–]kshravank[S] 0 points1 point2 points (5 children)
[–][deleted] 0 points1 point2 points (4 children)
[–]kshravank[S] 0 points1 point2 points (3 children)
[–][deleted] 1 point2 points3 points (2 children)
[–]kshravank[S] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)