I'm developing a plugin for sublime text and I'm have some problems handling a json file.
This is the json file
{
"desktop":{
"name":"build",
"upload":{
"maximum":512,
},
"load":{
"core":"i7",
}
},
"table":{
"name":"clean",
"upload":{
"maximum":1024,
},
"load":{
"core":"i3",
}
}
}
An this is how I load it
with open(self.path, 'r') as f:
text = f.read()
datas = json.loads(text)
for data in datas:
print(data['desktop'])
The output show me this error
TypeError: string indices must be integers
But when I try with data[0] I get one character from the json file.
I know I'm doing something wrong with the parse and encoding, but I don't know where. I been all day reading previous posts from here and trying to figure out what is the right way to do it.
I'll apreciate any help.
