Json Rest API

Is there a way to have the server return a json object vs xml when using the server rest api?



http://localhost:32400/library



i tried to set the Content-Type to application/json on the get request. but no luck.

I don’t thinks so. XML is pretty much it. Why do you need JSON? or is it just a matter of preference?



I want to make a web client for plex. just easier using json in javascript vs xml imo. XML will work fine though.

-nate

JSON would be much more light weight too

1 Like

Like with most just add:
‘Accept’: ‘application/json’
to your headers.

It works. I use this.

1 Like

I have tried this both from my app and SOAP UI. This does not work against plex.tv, will try it against the media server itself.

Edit: please ignore, can reach json versions by using the .json extension rather than a header.

Can you provide an example of the request URL to return json data?

This was a quick hack I did awhile back, it does have a serious bug… but enough to get going:

http://endlessnow.com/ten/Source/plex2html-py.txt

Did anyone got the json object out of plex media tv ?

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