videoProperties is not always a JSON array

Use this forum to discuss issues related to the SD-JSON service.

videoProperties is not always a JSON array

Postby skst » Thu Apr 13, 2017 7:50 pm

REF: https://github.com/SchedulesDirect/JSON ... stationids

Hello,

The above documentation doesn't mention that sometimes a schedule's videoProperties member might be a JSON object instead of a JSON array.I ran into the below JSON result today. Is this a bug in the emitted JSON or an oversight in the documentation? If the emitted JSON is correct, can you please expand the documentation to mention this and define what the "1" is?

Thanks for your help.

Code: Select all
program   {{
  "programID": "EP006228693397",
  "airDateTime": "2017-04-14T06:00:00Z",
  "duration": 1800,
  "md5": "lKUm/pNrZcku2RxtEq67ag",
  "new": true,
  "audioProperties": [
    "cc",
    "stereo"
  ],
  "videoProperties": {
    "1": "hdtv"
  },
  "ratings": [
    {
      "body": "USA Parental Rating",
      "code": "TVG"
    }
  ]
}}


Server ID: 20141201.web.1
Date/time: 4/14/2017 2:39:51 AM
ID: USA-IL58819-X
Name: WOW Chicago Suburbs - Digital
URI: /20141201/lineups/USA-IL58819-X
Transport: Cable
Location: Naperville
skst
 
Posts: 26
Joined: Fri Aug 17, 2007 8:13 am

Re: videoProperties is not always a JSON array

Postby gtb » Fri Apr 14, 2017 7:58 am

Also reported in: viewtopic.php?f=17&t=2903

I am highly suspicious of the change rolled out yesterday for expanded properties.
gtb
 
Posts: 50
Joined: Thu Oct 02, 2014 2:07 pm

Re: videoProperties is not always a JSON array

Postby jagsd » Fri Apr 14, 2017 8:06 am

I just ran into this videoProperties problem too. I suspect it is a bug introduced with the new HD qualifiers that were just introduced yesterday.

Instead of an array, an object is being printed. In javascript, objects are basically hash arrays with key/value pairs. Arrays are special objects also implemented as key/value pairs where the keys are the indexes of the array. So the { "1": "hdtv" } that you see is the array being printed as a regular object with the 1 being the key of the only entry.

But this appears to be happening only some of the time. It does not seem to happen when there are the new HD qualifiers in the props and thus more than one member in the array. When if fails this way, the few cases I have seen only have the single entry for { "1": "hdtv" }.

@rkulagow please fix this ASAP. Thanks.
jagsd
 
Posts: 32
Joined: Sun Sep 09, 2007 10:52 am

Re: videoProperties is not always a JSON array

Postby skst » Fri Apr 14, 2017 8:15 am

He's already fixed it. :)

From The Green Button:
rkulagow wrote:Our upstream changed their API and didn't let us know, so that broke things on our ingest, which then cascaded to the outputted data. The ingest has been fixed and the schedules are being regenerated.
skst
 
Posts: 26
Joined: Fri Aug 17, 2007 8:13 am


Return to SD-JSON service

Who is online

Users browsing this forum: No registered users and 1 guest