# JSON Problems

**URL:** <https://forums.plex.tv/t/json-problems/4207>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [June 24, 2010, 11:35am UTC](https://forums.plex.tv/t/json-problems/4207 "2010-06-24T11:35:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dermot](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dermot](https://forums.plex.tv/u/dermot)\
**Post date:** [June 24, 2010, 11:35am UTC](https://forums.plex.tv/t/json-problems/4207/1 "2010-06-24T11:35:22Z")

</div>

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:

```auto

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:  
  

```auto

AttributeError: 'dict' object has no attribute 'name'

```

  
  
Additionally, Log(chanInfo) gives me this in the log:  
  

```auto

{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

---

<div class="post-metadata">

**Author:** ![sansnipple](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sansnipple](https://forums.plex.tv/u/sansnipple)\
**Post date:** [June 24, 2010, 12:55pm UTC](https://forums.plex.tv/t/json-problems/4207/2 "2010-06-24T12:55:57Z")

</div>

you should just treat it as a normal dict, like so:

```auto

chanInfo['name']

```

---

<div class="post-metadata">

**Author:** ![dermot](https://avatars.discourse-cdn.com/v4/letter/d/5f9b8f/32.png) [@dermot](https://forums.plex.tv/u/dermot)\
**Post date:** [June 24, 2010, 9:35pm UTC](https://forums.plex.tv/t/json-problems/4207/3 "2010-06-24T21:35:11Z")

</div>

> [@](#):
>
> you should just treat it as a normal dict, like so:  
> 
> ```auto
> 
> chanInfo['name']
> 
> ```

  
Excellent, that worked - thanks! Clearly I have a lot to learn about Python but that's half the point of this exercise.  
  
Now, if I could just figure out why Plex won't update the thumbnails for my channels I'd be laughing...

---

<div class="post-metadata">

**Author:** ![sansnipple](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sansnipple](https://forums.plex.tv/u/sansnipple)\
**Post date:** [June 24, 2010, 10:31pm UTC](https://forums.plex.tv/t/json-problems/4207/4 "2010-06-24T22:31:14Z")

</div>

there is a bug with plex still using its client-side cached thumbnail for a plugin item even after the image pms is giving it has changed. your can find and remove it from plex’s userdata folder. or theres probably some trickery you can do to force it to expire the cache by making sure the thumb url is different, but its tricky and i’m not sure how sticky the cached thumbs really are. dont worry its most likely plex’s fault, not yours.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 8:39pm UTC](https://forums.plex.tv/t/json-problems/4207/5 "2019-12-20T20:39:56Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
