Roku Direct Publisher

Roku Direct Publisher - the easiest way to create a great TV experience. Learn more about how to create a Roku channel and share your experiences with others.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
mitchstein
Roku Guru

json format help

I've been trying to make a "series" json file...
this is the format I got so far from the help on the website.. But it fails the check.. can anyone see what I am missing, maybe a second eye will help me out.. once we get this one working then there will be a working example for all..

{   "providerName": "Acme Productions",
    "lastUpdated": "2015-11-11T22:21:37+00:00",
    "language": "en",
"Series":[
{
  "id": "1509428502952",
  "title": "The Amazing Series with Seasons!",
  "seasons": [
    {
  "seasonNumber": "1",
  "episodes": [
    {
  "id": "1509428502952",
  "title": "The Amazing First Episode Title",
  "content": {
    {
  "dateAdded": "2015-11-11T22:21:37+00:00",
  "videos": [
   {
  "url": "https://example.org/cdn/videos/1509428502952",
  "quality": "UHD",
  "videoType": "HLS"
   }
  ],
  "duration": 1290
             }
    },
  "thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
  "episodeNumber": 1,
  "shortDescription": "Marvelous episode description"
    }
  ]
    }
  ],
  "genres": [
    "educational",
    "science fiction",
    "thriller",
  ],
  "thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
  "shortDescription": "Wondrous series seasons."
}]
}
http://www.TVByDemand.com
0 Kudos
45 REPLIES 45
37mediagroup
Roku Guru

Re: json format help

Mitch, I noticed two { {  after content?  Not sure if that's allowed in json or not, so I took one of em out, and Thriller had a comma after it but it was the last item in a list. See if the below works.
{
    "providerName": "Acme Productions",
    "lastUpdated": "2015-11-11T22:21:37+00:00",
    "language": "en",
    "Series": [{
        "id": "1509428502952",
        "title": "The Amazing Series with Seasons!",
        "seasons": [{
            "seasonNumber": "1",
            "episodes": [{
                "id": "1509428502952",
                "title": "The Amazing First Episode Title",
                "content": {
                    "dateAdded": "2015-11-11T22:21:37+00:00",
                    "videos": [{
                        "url": "https://example.org/cdn/videos/1509428502952",
                        "quality": "UHD",
                        "videoType": "HLS"
                    }],
                    "duration": 1290
                },
                "thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
                "episodeNumber": 1,
                "shortDescription": "Marvelous episode description"
            }]
        }],
        "genres": [
            "educational",
            "science fiction",
            "thriller"
        ],
        "thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
        "shortDescription": "Wondrous series seasons."
    }]
}
0 Kudos
stubbstarbuck
Binge Watcher

Re: json format help

Use a linter, like jsonlint.com, to check your JSON before submitting it. I found a couple of syntax errors. The code below validates, but I didn't check it closely to see if it follows the schema. If you need a series template that does, I can send you one. Your valid code is below:

{
"providerName": "Acme Productions",
"lastUpdated": "2015-11-11T22:21:37+00:00",
"language": "en",
"Series": [{
"id": "1509428502952",
"title": "The Amazing Series with Seasons!",
"seasons": [{
"seasonNumber": "1",
"episodes": [{
"id": "1509428502952",
"title": "The Amazing First Episode Title",
"content": {
"dateAdded": "2015-11-11T22:21:37+00:00",
"videos": [{
"url": "https://example.org/cdn/videos/1509428502952",
"quality": "UHD",
"videoType": "HLS"
}],
"duration": 1290
}
}],
"thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
"episodeNumber": 1,
"shortDescription": "Marvelous episode description"
}]
}],
"genres": [
"educational",
"science fiction",
"thriller"
],
"thumbnail": "https://example.org/cdn/thumbnails/1509428502952/1",
"shortDescription": "Wondrous series seasons."
}
0 Kudos
mitchstein
Roku Guru

Re: json format help

pasnow, yeah that passes the lint test.. gonna plug in some of my data and see what happens. Thats awesome!!

stubbstarbuck , yeah I put it through there and the other one as well both responded with an error at { "provider.......

which basically means there is a syntax error somewhere in the document....
http://www.TVByDemand.com
0 Kudos
mitchstein
Roku Guru

Re: json format help

welp I'm about to give up on this json stuff.. there's too many control characters to keep track of it all.. I think it would about be easier to learn french then keep track of all the [{}] stupid stuff it needs.. comma delimited files worked for us from 1975-1990 without one problem and alot more clarity then this stuff.. I just spent 20 hours straight and I can't get the syntax down for more then 1 tv series video at a time. as soon as I add more then one the stupid brackets get all out of whack.. And since I program in classic asp there's noone here who can help with it and no one outside of here that is willing to go to the trouble of doing json, they do xml not json..

I really do not know how anyone can say, NO Scripting required, when you have to write in json scripting language.. arrrrrggghhh
http://www.TVByDemand.com
0 Kudos
mitchstein
Roku Guru

Re: json format help

I'm gonna go take a nap and maybe get back at it later on.. just so frustrating..
http://www.TVByDemand.com
0 Kudos
Zelkowo
Visitor

Re: json format help

It is frustrating, but once you figure it out it clicks...

I rely on this: http://jsonviewer.stack.hu/

When I have time I'll take a look
0 Kudos
mitchstein
Roku Guru

Re: json format help

http://jsonlint.com/

this one gives you pretty good error checking.. though it doesn't fail mistyped variables just tells you where it encounters syntax errors.. 
http://www.TVByDemand.com
0 Kudos
Zelkowo
Visitor

Re: json format help

How are you creating this feed?  Are you typing it in manually?
0 Kudos
mitchstein
Roku Guru

Re: json format help

LOL, as I said, now I am passing lint, but NO VALID ITEMS WERE FOUND IN THE FEED...

I shoulda just went to bed.. lol
http://www.TVByDemand.com
0 Kudos