Hi,
I’m pretty wet behind the ears when it comes to Plex/Python but I’ve pretty extensive experience in Perl so I’m not a complete newb. I’m working on a plug-in at the moment and am having problems with the JSON functions, specifically JSON.ObjectFromString().
My understanding is that I should be able to pass a JSON string to that function and then access the data in the string using a Python class. So, something like this:
chanInfo = JSON.ObjectFromString('{"name":"RTE One"}')<br />
Log(chanInfo.name)
Am I correct or is there something else that I need to do? Because if I do this I end up with the following message in the logs:
AttributeError: 'dict' object has no attribute 'name'
Additionally, Log(chanInfo) gives me this in the log:
{u'name': u'RTE One'}
I'm pretty sure that this isn't what's supposed to happen but maybe I'm missing a step? Is there a special way to access the data once you run JSON.ObjectFromString()?
Thanks,
dermot