# Invalid JSON response in library section

**URL:** <https://forums.plex.tv/t/invalid-json-response-in-library-section/32236>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [April 5, 2013, 6:53pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236 "2013-04-05T18:53:24Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Deathspike](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/deathspike/32/233756_2.png) [@Deathspike](https://forums.plex.tv/u/Deathspike)\
**Post date:** [April 5, 2013, 6:53pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/1 "2013-04-05T18:53:24Z")

</div>

I have encountered a bug in the JSON response of a library section. The JSON response is not valid JSON, as there is a comma missing between two directories. I have encountered this issue in one section, but the other three sections do not have the same issue.

&nbsp;

I cannot provide a reproduction plan due to this, however I have attached the HTTP request and response. My media server is always online and is attached to myPlex in case one of the administrators wishes to verify the issue. The section ID is 2.

&nbsp;

The issue appears between "Petite Princess Yucie" and "Pita Ten". Search for "}{".

```
{"_elementType":"Directory","ratingKey":7154,"key":"/library/metadata/7154/children","type":"show","title":"Petite Princess Yucie","summary":"Welcome to the Petite Princess Yucie guide at TV Tome.
Seventeen year old Yucie can never be taken seriously.  How can she when, she's been cursed to trapped in a ten year olds body.  Bright, cheerful and optimistic, Yucie has never let her curse get in the way of living a happy life.  Her life is about to change forever when she becomes a candidate to become the Platina Princess, an honor which will allow her ultimate wish to be granted!  Then she finds out that she is one of many candidates, and the competition gets intense! Opening Song:  \"Egao no Tensai\" by Maria Yamamoto, Yuki Matsuoka, Yukari Fukui, Ayako Kawasumi, Fumiko Orikasa Ending Song:  \"Genius of Smiles\" by Puchipurizu","index":1,"year":2002,"thumb":"/library/metadata/7154/thumb/1342544980","art":"/library/metadata/7154/art/1342544980","duration":1800000,"originallyAvailableAt":"2002-09-01","leafCount":26,"viewedLeafCount":0,"addedAt":1335088797,"updatedAt":1342544980,"_children":[]}{"_elementType":"Directory","ratingKey":7806,"key":"/library/metadata/7806/children","type":"show","title":"Pita Ten"
```

&nbsp;

Information:

```
Operating System: Windows 8 64-Bit
Plex Server Version: 0.9.7.22
```

&nbsp;

Request (DeathServer is the local network name of the server):

```
GET /library/sections/2/all HTTP/1.0
User-Agent: Fiddler
Accept: application/json
Host: deathserver:32400
```

&nbsp;

Response (Paste due to the size):

[http://pastebin.com/8WGQeDkE](http://pastebin.com/8WGQeDkE)

---

<div class="post-metadata">

**Author:** ![schuyler](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/schuyler/32/88307_2.png) [@schuyler](https://forums.plex.tv/u/schuyler)\
**Post date:** [April 5, 2013, 7:07pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/2 "2013-04-05T19:07:53Z")

</div>

Indeed, we've seen this problem. We have an internal issue filed and will hopefully get it fixed soon. Thanks for the report!

P.S. Working on anything fun? :]

---

<div class="post-metadata">

**Author:** ![Deathspike](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/deathspike/32/233756_2.png) [@Deathspike](https://forums.plex.tv/u/Deathspike)\
**Post date:** [April 5, 2013, 7:22pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/3 "2013-04-05T19:22:25Z")

</div>

> Indeed, we've seen this problem. We have an internal issue filed and will hopefully get it fixed soon. Thanks for the report!
> 
> P.S. Working on anything fun? :]

Ah that is good news! Thank you for the quick response. I'm currently playing around with a prototype to allow an export of your library to an online site. The idea is to let other people browse around in your library without exposing administrative functionality or having to have your server running. The idea is to, eventually, allow a library to be published to an online source with all metadata and activity information in a clear manner. The earliest prototype can be viewed at&nbsp;[http://www.roelvanuden.nl/plex/](http://www.roelvanuden.nl/plex/)&nbsp;running on a basic Apache server on some cheap hosting. :)

---

<div class="post-metadata">

**Author:** ![n0clue](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@n0clue](https://forums.plex.tv/u/n0clue)\
**Post date:** [September 25, 2013, 8:02am UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/4 "2013-09-25T08:02:42Z")

</div>

This issue has not yet&nbsp;been resolved. right? When requesting, recently added then plex return invalid json as descriped in Deathspike's post.

Request:&nbsp;  
&nbsp;

GET [http://10.0.0.3:32400/library/onDeck](http://10.0.0.3:32400/library/onDeck) HTTP/1.1

User-Agent: Fiddler

Accept: application/json

Host: 10.0.0.3:32400

&nbsp;

I'm not experiencing any issue with other requests. it's seems only to be an issue with recentlyAdded.

Server is running version, 0.9.8.6.175-88ffbb2.

---

<div class="post-metadata">

**Author:** ![gugahoi](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/gugahoi/32/104768_2.png) [@gugahoi](https://forums.plex.tv/u/gugahoi)\
**Post date:** [March 15, 2014, 11:14am UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/5 "2014-03-15T11:14:14Z")

</div>

I get the same issue on the recently added section but onDeck works fine.

[http://plex.server.ip:32400/library/recentlyAdded](http://plex.server.ip:32400/library/recentlyAdded) when using "{Accept:&nbsp;application/json}" header

---

<div class="post-metadata">

**Author:** ![ozie](https://avatars.discourse-cdn.com/v4/letter/o/c2a13f/32.png) [@ozie](https://forums.plex.tv/u/ozie)\
**Post date:** [June 7, 2014, 2:59am UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/6 "2014-06-07T02:59:02Z")

</div>

i get a json error when viewing TV show info from&nbsp;/library/metadata/XXXXXX/children (XXXXX is any shows ID)

if the show has only one season the json works.. but if there is more than one season the json results is invalid

Oz

---

<div class="post-metadata">

**Author:** ![cossie7722](https://avatars.discourse-cdn.com/v4/letter/c/c5a1d2/32.png) [@cossie7722](https://forums.plex.tv/u/cossie7722)\
**Post date:** [October 13, 2014, 6:04pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/7 "2014-10-13T18:04:52Z")

</div>

Any update on when this issue is going to be fixed?

I have the exact same issue as Deathspike.

{HOST}/library/recentlyAdded is invalid json. Several place are missing ',' so there are '{}' groups.

---

<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, 11:10pm UTC](https://forums.plex.tv/t/invalid-json-response-in-library-section/32236/8 "2019-12-20T23:10:40Z")

</div>

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