Your Digital Media Has Never Looked So Good

 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

json format help

Sun Apr 16, 2017 12:13 am

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."
}]
}
 
Pasnow
Posts: 72
Joined: Sat Jul 27, 2013 12:32 pm
Contact:

Re: json format help

Sun Apr 16, 2017 5:12 am

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."
    }]
}
 
stubbstarbuck
Posts: 7
Joined: Mon Apr 17, 2017 7:08 pm

Re: json format help

Mon Apr 17, 2017 7:19 pm

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."
}
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Mon Apr 17, 2017 10:23 pm

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....
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Wed Apr 19, 2017 7:20 pm

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
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Wed Apr 19, 2017 7:21 pm

I'm gonna go take a nap and maybe get back at it later on.. just so frustrating..
 
Zelkowo
Posts: 9
Joined: Tue Apr 18, 2017 11:43 am

Re: json format help

Wed Apr 19, 2017 8:13 pm

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
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Wed Apr 19, 2017 8:56 pm

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.. 
 
Zelkowo
Posts: 9
Joined: Tue Apr 18, 2017 11:43 am

Re: json format help

Wed Apr 19, 2017 9:06 pm

How are you creating this feed?  Are you typing it in manually?
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Wed Apr 19, 2017 10:01 pm

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
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Wed Apr 19, 2017 10:12 pm

Zelkowo wrote:
How are you creating this feed?  Are you typing it in manually?

LOL, no way, 14+ seasons 30+ average videos per season..
I'm coding in classic asp to read my database and write the json file..
I got it working with standard videos, but with standard videos the DP has too many limitations, it was suggested I do it as a series, since that is what it is, a tv series..
I would post what I am creating, but the forums are limited to 60,000 characters to a post and my json file has 251,000+ characters just for one tv series. I have 8 to put in the channel.

I'm still not getting what is wrong with the old sample player and why that couldn't have been used as the model for the DP player with it's nice easy use of xml files instead of json files and it's much unneccessary complex syntax. I guess I'm just getting too old for this stuff..

Speaking of old, does anyone know if IIS from server 2016 standard still supports classic asp or should I stick with 2012 r2?
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Thu Apr 20, 2017 8:18 pm

[table][tr][td][img=32x19]http://www.gravatar.com/avatar/7640de9c970917aa31b3c8ef8d0b2e96?size=40&default=https%3A%2F%2Fassets.zendesk.com%2Fimages%2F2016%2Fdefault-avatar-80.png&r=g[/img][/td]
[td]Mitch
Apr 19, 22:47 PDT
I created this json file (snipet)
{
"providerName": "TVByDemand Productions",
"lastUpdated": "2017-04-20T12:57:08+00:00",
"language": "en",
"Series": [{
"id": "1",
"title": "Bonanza",
"seasons": [{
"seasonnumber": "1",
"episodes": [{
"id": "2085",
"title": "S1E12 The Hanging Posse",
"content": {
"dateAdded": "2016-03-03T12:35:13+00:00",
"videos": [{
"url": "http://www.tvbydemand.com/[color=#2b2e2f].............n1/s01e12/finished.ism/manifest",[/color]
"quality": "SD",
"videoType": "SMOOTH",
"duration": 3623,
"thumbnail": "http://www.tvbydemand.com/images/bonanza.JPG",
"episodenumber": 12,
"shortDescription": "S1E12 The Hanging Posse"
}]
}
},
{
"id": "2086",
"title": "S1E13 Vendetta",
"content": {
"dateAdded": "2016-03-03T12:35:14+00:00",
"videos": [{
"url": "http://www.tvbydemand.com/[color=#2b2e2f]....................1/s01e13/finished.ism/manifest",[/color]
"quality": "SD",
"videoType": "SMOOTH",
"duration": 2969,
"thumbnail": "http://www.tvbydemand.com/images/bonanza.JPG",
"episodenumber": 13,
"shortDescription": "S1E13 Vendetta"
}]
}
},
{
"id": "2087",
"title": "S1E14 The Sisters",
"content": {
"dateAdded": "2016-03-03T12:35:16+00:00",
"videos": [{
"url": "http://www.tvbydemand.com/media3/iis/tv/bonanza/season1/s01e14/finished.ism/manifest",
"quality": "SD",
"videoType": "SMOOTH",
"duration": 3464,
"thumbnail": "http://www.tvbydemand.com/images/bonanza.JPG",
"episodenumber": 14,
"shortDescription": "S1E14 The Sisters"
}]
}
}
]
}]
}]
}
It passes lint but when I add it to my channel in dp it says no valid entries…
What am I missing? Been working on this all day..[/td]
[/tr]
[/table]


So here is where I am stuck, this passes the lint test but roku says no valid entries found... Anyone got any ideas, it might be a simple thing I just keep missing, maybe just a glance at it by a second set of eyes..
 
Pasnow
Posts: 72
Joined: Sat Jul 27, 2013 12:32 pm
Contact:

Re: json format help

Fri Apr 21, 2017 6:10 am

at the end of your urls you have a [/color] ?  Is that supposed to be there, or did that just post into the forum somehow?!
 
mosafer
Posts: 19
Joined: Tue Feb 21, 2017 1:19 pm

Re: json format help

Fri Apr 21, 2017 9:01 am

mitchstein wrote:
[table][tr][td][img=32x19]http://www.gravatar.com/avatar/7640de9c970917aa31b3c8ef8d0b2e96?size=40&default=https%3A%2F%2Fassets.zendesk.com%2Fimages%2F2016%2Fdefault-avatar-80.png&r=g[/img][/td]
[td]Mitch
Apr 19, 22:47 PDT
I created this json file (snipet)
...
It passes lint but when I add it to my channel in dp it says no valid entries…
What am I missing? Been working on this all day..[/td]
[/tr]
[/table]


So here is where I am stuck, this passes the lint test but roku says no valid entries found... Anyone got any ideas, it might be a simple thing I just keep missing, maybe just a glance at it by a second set of eyes..

Same problem but I have an idea.
based on Direct Publisher Feed (JSON) document (https://github.com/rokudev/feed-specifi ... .md#season), seasonNumber type is integer. I think we should try:
"seasonNumber": 1, Without quotation marks
I updated my json but still waiting for processing.
 
User avatar
mitchstein
Topic Author
Posts: 129
Joined: Tue Mar 11, 2014 10:35 am
Contact:

Re: json format help

Fri Apr 21, 2017 10:11 am

Pasnow wrote:
at the end of your urls you have a [/color] ?  Is that supposed to be there, or did that just post into the forum somehow?!

No the forums added that... guessing when I told it to remove the hyperlinks in the editor because they would normally be blue..

Who is online

Users browsing this forum: No registered users and 1 guest