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

Roku will not accept my JSON feed

Trying to upgrade my existing channel from dinosaur to DP. I'm at the part where I have to enter the feed URL.

I used the sample JSON code from RokuChrisT, and just filled in my own content. Did not change the syntax. But Roku comes back saying:
The feed URL(s) could not be validated.

  • JSON (SyntaxError: Unexpected token : in JSON at position 1326)

    I can't find what could be wrong with my code. Can you guys help me figure this out?
    Here is the code that is included in my feed file:

    {
        "providerName": "Food Chain TV",
        "language": "en-US",
        "lastUpdated": "2017-01-01T18:12:32.125Z",
        "shortFormVideos": [{
            "id": "peel garlic how to",
            "title": "How to Peel Garlic",
            "shortDescription": "In this video, you will learn the quickest way to peel garlic.",
            "thumbnail": "http://www.foodchaintv.com/testing/images/peelgarlictitle.jpg",
            "genres": ["food"],
            "tags": ["food", "cooking", "garlic", "chef", "how to"],
            "releaseDate": "2017-01-01",
            "content": {
                "dateAdded": "2017-04-21T14:14:54.431Z",
                "captions": [],
                "duration": 171,
                "adBreaks": [],
                "videos": [{
                    "url": "http://goo.gl/sPOkKT",
                    "quality": "HD",
                    "videoType": "MP4"
                }]
            }
        }, {
            "id": "chicken feet ths",
            "title": "Chinese Style Chicken Feet",
            "shortDescription": "In this video you will learn how to make delicious dim sum style chicken feet.",
            "thumbnail": "http://www.foodchaintv.com/testing/images/chickenfeettitle.jpg",
            "genres": ["food"],
            "tags": ["food", "cooking", "eating"],
            "releaseDate": "2016-01-01",
            "content": {
                "dateAdded": "2016-05-21T14:14:54.431Z",
                "captions": [],
                "duration": 365,
                "adBreaks": [],
                "videos": [{
                    "url": "http://goo.gl/RjmM5r",
                    "quality": "HD",
                    "videoType": "MP4"
                }]
            }
        },    
        "playlists": [{
            "name": "how to videos",
            "itemIds": ["peel garlic how to",]
        }, {
            "name": "skillet",
            "itemIds": [""]
        }, {
            "name": "board",
            "itemIds": [""]
        }],
        "categories": [{
            "name": "How To Videos",
            "playlistName": "how to videos",
            "order": "manual"
        }, {
            "name": "The Hot Skillet",
            "playlistName": "skillet",
            "order": "manual"
        }, {
            "name": "On The Cutting Board",
            "playlistName": "board",
            "order": "manual"}]}


    Running the code through JSONLint give me the following error, which I don't know how to fix:
    ', got ':'

    Can you guys help me figure this out? [/color]

    Thanks,



     
  • 0 Kudos
    2 REPLIES 2
    belltown
    Roku Guru

    Re: Roku will not accept my JSON feed

    Your shortFormVideos array is not terminated with a closing bracket (before playlists).

    You also have a spurious comma at the end of your first itemIds array.

    It should look like this:

    {
     "providerName": "Food Chain TV",
     "language": "en-US",
     "lastUpdated": "2017-01-01T18:12:32.125Z",
     "shortFormVideos": [
       {
         "id": "peel garlic how to",
         "title": "How to Peel Garlic",
         "shortDescription": "In this video, you will learn the quickest way to peel garlic.",
         "thumbnail": "http://www.foodchaintv.com/testing/images/peelgarlictitle.jpg",
         "genres": [
           "food"
         ],
         "tags": [
           "food",
           "cooking",
           "garlic",
           "chef",
           "how to"
         ],
         "releaseDate": "2017-01-01",
         "content": {
           "dateAdded": "2017-04-21T14:14:54.431Z",
           "captions": [],
           "duration": 171,
           "adBreaks": [],
           "videos": [
             {
               "url": "http://goo.gl/sPOkKT",
               "quality": "HD",
               "videoType": "MP4"
             }
           ]
         }
       },
       {
         "id": "chicken feet ths",
         "title": "Chinese Style Chicken Feet",
         "shortDescription": "In this video you will learn how to make delicious dim sum style chicken feet.",
         "thumbnail": "http://www.foodchaintv.com/testing/images/chickenfeettitle.jpg",
         "genres": [
           "food"
         ],
         "tags": [
           "food",
           "cooking",
           "eating"
         ],
         "releaseDate": "2016-01-01",
         "content": {
           "dateAdded": "2016-05-21T14:14:54.431Z",
           "captions": [],
           "duration": 365,
           "adBreaks": [],
           "videos": [
             {
               "url": "http://goo.gl/RjmM5r",
               "quality": "HD",
               "videoType": "MP4"
             }
           ]
         }
       }
     ],
     "playlists": [
       {
         "name": "how to videos",
         "itemIds": [
           "peel garlic how to"
         ]
       },
       {
         "name": "skillet",
         "itemIds": [
           ""
         ]
       },
       {
         "name": "board",
         "itemIds": [
           ""
         ]
       }
     ],
     "categories": [
       {
         "name": "How To Videos",
         "playlistName": "how to videos",
         "order": "manual"
       },
       {
         "name": "The Hot Skillet",
         "playlistName": "skillet",
         "order": "manual"
       },
       {
         "name": "On The Cutting Board",
         "playlistName": "board",
         "order": "manual"
       }
     ]
    }

    ... and now I know how to peel garlic!
    0 Kudos
    FoodChainTV
    Visitor

    Re: Roku will not accept my JSON feed

    That did it!

    Thank you very much for your help.
    0 Kudos
    Need Assistance?
    Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

    Become a Roku Streaming Expert!

    Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.