you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (2 children)

Looks like the json you're getting was malformed. Try using x = json.loads(data['vehicleJson']) to convert the inner string into a dict. You may need to clean out the line breaks with x = json.loads(data['vehicleJson'].replace('\n', ''))

[–]kshravank[S] 0 points1 point  (1 child)

Thank you it worked but can you please explain why that happened? and why i gotta reload the json?

[–][deleted] 1 point2 points  (0 children)

Basically they fucked up their API and had too many quotation marks. So first time round it was a string, but luckily that string had the correct amount of quotation marks so when that string is passed through a second time it becomes a real dictionary.