Roku Direct Publisher

The easiest way to create a great TV experience.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Gimpy
Level 7

Issues with Direct Publisher (JSON)

I am currently having issues uploading my Roku channel with the Direct Publisher tool. When I try inputting my URL for my media feed, I get this error below.

JSON (SyntaxError: Unexpected token in JSON at position 0)

I have ran my JSON file through various websites to determine if my file is valid in which it had passed each website's validation test. It is important to note that my media feed/JSON file does originate from an AWS S3 bucket. I have been in constant communication with customer service to the point where this issue has been escalated to the Engineering department. They also direct me to this forum where I may be able to get assistance from the public. I have listed the JSON file below, how can I fix this issue?

{
  "providerName": "Example LLC",
  "language": "en-US",
  "lastUpdated": "2021-06-28T11:59:58+00:00",
  "liveFeed": [
    {
      "id": "12340dc1b1c11c000101fd2e",
      "title": "Live Example",
      "content": {
        "dateAdded": "2021-05-02",
        "videos": [
          {
            "url": "https://example.s3.amazonaws.com/example/media/live/video.m3u8",
            "quality": "HD",
            "videoType": "HLS"
          }
        ],
        "language": "en-us"
      },
      "thumbnail": "https://example.s3.amazonaws.com/live/thumbs/12340dc1b1c11c000101fd2e/thumb.jpg",
      "shortDescription": "Example Stream",
      "tags": [],
      "genres": []
    }
  ],
  "Recipe": [
    {
      "id": "10d4cd2aa00d240000f2b0ca",
      "title": "Example: Another",
      "thumbnail": "https://example.s3.amazonaws.com/outputs/10d4cd2aa00d240000f2b0ca/Default/Thumbnails/out_003.png",
      "shortDescription": "No description.",
      "longDescription": "No description.",
      "releaseDate": "2021-06-24T18:21:09.085Z",
      "content": {
        "dateAdded": "2021-06-24T18:38:54.509Z",
        "videos": [
          {
            "url": "https://example.s3.amazonaws.com/outputs/10d4cd2aa00d240000f2b0ca/Default/HLS/out.m3u8",
            "quality": "HD",
            "videoType": "HLS"
          }
        ]
      },
      "duration": 622,
      "tags": [
        "video"
      ]
    },
    {
      "id": "00d4cd200f200c0000000f30",
      "title": "Recipe",
      "thumbnail": "https://example.s3.amazonaws.com/outputs/00d4cd200f200c0000000f30/Default/Thumbnails/out_003.png",
      "shortDescription": "No description.",
      "longDescription": "No description.",
      "releaseDate": "2021-06-24T18:20:09.096Z",
      "content": {
        "dateAdded": "2021-06-24T18:31:02.484Z",
        "videos": [
          {
            "url": "https://example.s3.amazonaws.com/outputs/00d4cd200f200c00090000f30/Default/HLS/out.m3u8",
            "quality": "HD",
            "videoType": "HLS"
          }
        ]
      },
      "duration": 5000,
      "tags": [
        "video"
      ]
    }
  ],
  "series": [
    {
      "id": "00d4cd2aa00d000000f4b0ca",
      "title": "Playlist",
      "shortDescription": "example",
      "thumbnail": "https://example.s3.amazonaws.com/outputs/00d4cd2aa00d000000f4b0ca/Default/Thumbnails/out_003.png",
      "genres": [
        ""
      ],
      "tags": [
        ""
      ],
      "seasons": [
        {
          "title": "Recipe",
          "episode": [
            {
              "id": "00d4cd2aa00d000000f4b0ca",
              "title": "Example: Episode 1",
              "episodeNumber": 1,
              "content": {
                "dateAdded": "2021-06-24T18:38:54.509Z",
                "videos": [
                  {
                    "videoType": "HLS",
                    "url": "https://example.s3.amazonaws.com/outputs/00d4cd2aa00d000000f4b0ca/Default/HLS/out.m3u8",
                    "quality": "HD"
                  }
                ],
                "duration": 500,
                "captions": [],
                "language": "en-us"
              },
              "thumbnail": "https://example.s3.amazonaws.com/outputs/00d4cd2aa00d000000f4b0ca/Default/Thumbnails/out_003.png"
            },
            {
              "id": "00d4cd000f000c0000000f30",
              "title": "Another Example",
              "episodeNumber": 2,
              "content": {
                "dateAdded": "2021-06-24T18:31:02.484Z",
                "videos": [
                  {
                    "videoType": "HLS",
                    "url": "https://example.s3.amazonaws.com/outputs/00d4cd000f000c0000000f30/Default/HLS/out.m3u8",
                    "quality": "HD"
                  }
                ],
                "duration": 5000,
                "captions": [],
                "language": "en-us"
              },
              "thumbnail": "https://example.s3.amazonaws.com/outputs/00d4cd000f000c0000000f30/Default/Thumbnails/default_003.png"
            }
          ]
        }
      ]
    }
  ]
}

 

 

0 Kudos
1 REPLY 1\
Baradanikto
Level 13

Re: Issues with Direct Publisher (JSON)

I'm not sure how you coded your feed file, but, it has several 'logic' errors.  While it may have been validated by a Json linter, it does not meet the specifications of the Direct Publisher Json Schema.  Json linters look for syntax errors in the Json.  They do not validate against a Schema.

For example, your feed contains a "liveFeed" object followed by a "Recipe" object.  The Roku schema does not contain a "Recipe" object.  It looks like you may have tried to define "Recipe" under a different object type, but, it is not correct according to the Roku Json Schema.

If you are coding the feed file using an editor like NotePad, don't.  There are plenty of "tools" available on this forum to help you create and manage your feed file.

FREE Windows desktop software for creating BIF (Trick Play), Direct Publisher (MRSS, JSON), and FireTV feeds @ GitHub/rrirower. No programming knowledge required.
0 Kudos