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: 
DGPT
Visitor

myjson.com vs JSON validator

According to http://www.jsonschemavalidator.net/, my JSON file has no errors and is valid. When I try to store the file at myjson.com, it replies with a "Error: Your JSON appears to be invalid." message.

Has anyone had this issue before? Any ideas?


{
"providerName":"Disc Golf Pro Tour",
"lastUpdated":"2017-01-01T22:21:37+00:00",
"language":"en-US",
"Series":
[{
"Id":"20171SHOT",
"title":"One Shot",
"Seasons":
[{
"seasonNumber":1,
"Episodes":
[{
"Id":"20171SHOTRW",
"title":"One Shot: Ricky Wysocki",
"Content":
{
"dateAdded":"2017-01-01T22:21:37+00:00",
"Videos":
[{
"url":"https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-17.mp4",
"quality":"HD",
"videoType":"MP4",
}],
"Duration":35,
},
"thumbnail":"https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-wysocki.png",
"episodeNumber":1,
"releaseDate":"2017-01-01",
"shortDescription":"Ricky Wysocki’s defining shot of the 2016 season."
},
{
"Id":"20170101PM1",
"title":"One Shot: Paul McBeth",
"Content":
{
"dateAdded":"2017-02-01T22:21:37+00:00",
"Videos":
[{
"url":"https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-21.mp4",
"quality":"HD",
"videoType":"MP4",
}],
"Duration":32,
},
"thumbnail":"https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-mcbeth.png",
"episodeNumber":2,
"releaseDate":"2017-02-01",
"shortDescription":"Paul McBeth’s defining shot of the 2016 season."
}],
"Genres":["sports"],
"thumbnail":"https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-Series.png",
"releaseDate":"2017-01-01",
"shortDescription":"Each player’s greatest shots of the 2016 season."
}]
        }]
}
0 Kudos
7 REPLIES 7
37mediagroup
Roku Guru

Re: myjson.com vs JSON validator

I recv'd this:

Error: Parse error on line 18:
...oType": "MP4", }], "Duration":
----------------------^
Expecting 'STRING', got '}'

Which seems to indicate you shouldn't have a comma after: "videoType": "MP4",  because the next line begins with an }  not a text/string.  I believe of course, I'm not a json expert per se. Did you do a bit of copying & pasting with this, if so that could be the cause due to previously it was laid out with a statement following the videotype so it had a comma, in which you removed the following statement but not the comma.

I use http://jsonlint.com/  btw. .
0 Kudos
belltown
Roku Guru

Re: myjson.com vs JSON validator

Pasnow is correct. In JSON, commas are only used BETWEEN object elements and array elements. Trailing commas are not allowed. See the diagrams on http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf for a specification of what JSON allows. I wouldn't use any "validator" that accepts trailing commas. If I were you, I'd use http://www.jslint.com/. jslint was developed by Douglas Crockford, the creator of JSON, and validates JSON as well as JavaScript.
0 Kudos
DGPT
Visitor

Re: myjson.com vs JSON validator

1. Thank you. jsonlint.com is much better!
" around these objects.

Error: Parse error on line 8:
..., "20170101PM"] } "categories": { "n
---------------------^
Expecting 'EOF', '}', ',', ']', got 'STRING'"



{
"providerName": "Disc Golf Pro Tour",
"lastUpdated": "2017-01-01T22:21:37+00:00",
"language": "en-US",
"playlists": [{
"name": "DGPT Trailers",
"ItemIDs": ["20170101RW", "20170101PM"]
}]
"categories": [{
"name": "Disc Golf",
"playlistName": "DGPT Trailers",
"query": "disc",
"order ": "chronological"
}]
"Series": [{
"Id": "20171SHOT",
"title": "One Shot",
"Seasons": [{
"seasonNumber": 1,
"Episodes": [{
"Id": "20170101RW",
"title": "One Shot: Ricky Wysocki",
"Content": {
"dateAdded": "2017-01-01T22:21:37+00:00",
"Videos": [{
"url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-17.mp4",
"quality": "HD",
"videoType": "MP4"
}],
"Duration": 35
},
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-wysocki.png",
"episodeNumber": 1,
"releaseDate": "2017-01-01",
"shortDescription": "Ricky Wysocki’s defining shot of the 2016 season."
}, {
"Id": "20170101PM",
"title": "One Shot: Paul McBeth",
"Content": {
"dateAdded": "2017-02-01T22:21:37+00:00",
"Videos": [{
"url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-21.mp4",
"quality": "HD",
"videoType": "MP4"
}],
"Duration": 32
},
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-mcbeth.png",
"episodeNumber": 2,
"releaseDate": "2017-02-01",
"shortDescription": "Paul McBeth’s defining shot of the 2016 season."
}],
"Genres": ["sports"],
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-Series.png",
"releaseDate": "2017-01-01",
"shortDescription": "Each player’s greatest shots of the 2016 season."
}]
}]

}


{
"providerName": "Disc Golf Pro Tour",
"lastUpdated": "2017-01-01T22:21:37+00:00",
"language": "en-US",
"playlists": {
"name": "DGPT Trailers",
"ItemIDs": ["20170101RW", "20170101PM"]
}
"categories": {
"name": "Disc Golf",
"playlistName": "DGPT Trailers",
"query": "disc",
"order ": "chronological"
}
"Series": [{
"Id": "20171SHOT",
"title": "One Shot",
"Seasons": [{
"seasonNumber": 1,
"Episodes": [{
"Id": "20170101RW",
"title": "One Shot: Ricky Wysocki",
"Content": {
"dateAdded": "2017-01-01T22:21:37+00:00",
"Videos": [{
"url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-17.mp4",
"quality": "HD",
"videoType": "MP4"
}],
"Duration": 35
},
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-wysocki.png",
"episodeNumber": 1,
"releaseDate": "2017-01-01",
"shortDescription": "Ricky Wysocki’s defining shot of the 2016 season."
}, {
"Id": "20170101PM",
"title": "One Shot: Paul McBeth",
"Content": {
"dateAdded": "2017-02-01T22:21:37+00:00",
"Videos": [{
"url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-21.mp4",
"quality": "HD",
"videoType": "MP4"
}],
"Duration": 32
},
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-mcbeth.png",
"episodeNumber": 2,
"releaseDate": "2017-02-01",
"shortDescription": "Paul McBeth’s defining shot of the 2016 season."
}],
"Genres": ["sports"],
"thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-Series.png",
"releaseDate": "2017-01-01",
"shortDescription": "Each player’s greatest shots of the 2016 season."
}]
}]

}
0 Kudos
37mediagroup
Roku Guru

Re: myjson.com vs JSON validator

{
    "providerName": "Disc Golf Pro Tour",
    "lastUpdated": "2017-01-01T22:21:37+00:00",
    "language": "en-US",
    "playlists": {
        "name": "DGPT Trailers",
        "ItemIDs": ["20170101RW", "20170101PM"]
    },
    "categories": {
        "name": "Disc Golf",
        "playlistName": "DGPT Trailers",
        "query": "disc",
        "order ": "chronological"
    },
    "Series": [{
        "Id": "20171SHOT",
        "title": "One Shot",
        "Seasons": [{
            "seasonNumber": 1,
            "Episodes": [{
                "Id": "20170101RW",
                "title": "One Shot: Ricky Wysocki",
                "Content": {
                    "dateAdded": "2017-01-01T22:21:37+00:00",
                    "Videos": [{
                        "url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-17.mp4",
                        "quality": "HD",
                        "videoType": "MP4"
                    }],
                    "Duration": 35
                },
                "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-wysocki.png",
                "episodeNumber": 1,
                "releaseDate": "2017-01-01",
                "shortDescription": "Ricky Wysocki’s defining shot of the 2016 season."
            }, {
                "Id": "20170101PM",
                "title": "One Shot: Paul McBeth",
                "Content": {
                    "dateAdded": "2017-02-01T22:21:37+00:00",
                    "Videos": [{
                        "url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-21.mp4",
                        "quality": "HD",
                        "videoType": "MP4"
                    }],
                    "Duration": 32
                },
                "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-mcbeth.png",
                "episodeNumber": 2,
                "releaseDate": "2017-02-01",
                "shortDescription": "Paul McBeth’s defining shot of the 2016 season."
            }],
            "Genres": ["sports"],
            "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-Series.png",
            "releaseDate": "2017-01-01",
            "shortDescription": "Each player’s greatest shots of the 2016 season."
        }]
    }]

}

Possibly it was missing commas after Categories & Series. Try the above?
0 Kudos
DGPT
Visitor

Re: myjson.com vs JSON validator

Thank you. It is so easy to see the error after someone points it out. I can sense that the channel is getting soooo close. However, I'm now getting this when I upload the Feed URL.

Feed URL: https://api.myjson.com/bins/yxdwt

Result from Direct Publisher:
The feed URL(s) could not be validated.
  • There was a transport-level error - (Unknown ERROR).
  • 0 Kudos
    37mediagroup
    Roku Guru

    Re: myjson.com vs JSON validator

    Beyond my scope, but a general google search of the error on other sites seems to indicate a server not found/connection issue.  Are you sure you pasted the correct URL. Maybe try it again, isn't there a "Refresh Feed" button or something?  Otherwise maybe it just timed out or try repasting it into myjson for a new feed url. 


    https://support.solarwinds.com/Success_ ... nitor_(NPM)/A_transport-level_error_has_occurred_when_receiving_results_from_the_server_(provider%3A_TCP_Provider,_error%3A_0_-_The_specified_network_name_is_no_longer_available.)


    Cause
    The cause is environmental and can be a number of things regarding the SQL server and configuration.
    It can be a deadlock in the database and time outs need to be increased.
    It can also be a network connectivity issue.
    0 Kudos
    DGPT
    Visitor

    Re: myjson.com vs JSON validator

    Yeah, I found the same stuff. Unless myjson.com is down, it feels like the feed should be validated.

    When I host the file at myjson.com - https://api.myjson.com/bins/13d1o9 - I get this error from Direct Publisher:

    The feed URL(s) could not be validated.
  • There was a transport-level error - (Unknown ERROR)

    When I host the file at jsonblob.com - https://jsonblob.com/e396e9b6-f655-11e6-95c2-1d73f9242722 - I get this error from Direct Publisher:
    The feed URL(s) could not be validated.
  • The server returned an unsupported content type. Was expecting 'application/rss+xml', 'text/xml', 'application/xml' or 'application/json' but received 'application/octet-stream'

    {
      "providerName": "Disc Golf Pro Tour",
      "lastUpdated": "2017-01-01T22:21:37+00:00",
      "language": "en-US",
      "playlists": {
        "name": "DGPT Trailers",
        "ItemIDs": [
          "20170101RW",
          "20170101PM"
        ]
      },
      "categories": {
        "name": "Disc Golf",
        "playlistName": "DGPT Trailers",
        "query": "disc",
        "order ": "chronological"
      },
      "Series": [
        {
          "Id": "20171SHOT",
          "title": "One Shot",
          "Seasons": [
            {
              "seasonNumber": 1,
              "Episodes": [
                {
                  "Id": "20170101RW",
                  "title": "One Shot: Ricky Wysocki",
                  "Content": {
                    "dateAdded": "2017-01-01T22:21:37+00:00",
                    "Videos": [
                      {
                        "url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-17.mp4",
                        "quality": "HD",
                        "videoType": "MP4"
                      }
                    ],
                    "Duration": 35
                  },
                  "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-wysocki.png",
                  "episodeNumber": 1,
                  "releaseDate": "2017-01-01",
                  "shortDescription": "Ricky Wysocki defining shot of the 2016 season."
                },
                {
                  "Id": "20170101PM",
                  "title": "One Shot: Paul McBeth",
                  "Content": {
                    "dateAdded": "2017-02-01T22:21:37+00:00",
                    "Videos": [
                      {
                        "url": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/output_HD720-21.mp4",
                        "quality": "HD",
                        "videoType": "MP4"
                      }
                    ],
                    "Duration": 32
                  },
                  "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-mcbeth.png",
                  "episodeNumber": 2,
                  "releaseDate": "2017-02-01",
                  "shortDescription": "Paul McBeths defining shot of the 2016 season."
                }
              ],
              "Genres": [
                "sports"
              ],
              "thumbnail": "https://s3.amazonaws.com/assets.dgpt.com/2017/02/YouTube-Thumbnail-Series.png",
              "releaseDate": "2017-01-01",
              "shortDescription": "Each players greatest shots of the 2016 season."
            }
          ]
        }
      ]
    }
  • 0 Kudos