SchedulesDirect / JSON-Service

Code related to download, slice-and-dice and generation of JSON into database.
36 stars 5 forks source link

FEATURE: List headends function should return a JSON array [] #42

Closed pla1 closed 9 years ago

pla1 commented 9 years ago

The output from this function should return a true JSON array. https://json.schedulesdirect.org/20140530/headends?country=USA&postalcode=60030

Below is a mock-up of what it could look like. This would enable transforming the output to Java POJOs using com.google.gson.Gson. See this forum post for more information.

{  
   "headends":[  
      {  
         "headend":"60030",
         "type":"Over-the-Air",
         "location":"60030",
         "lineups":[  
            {  
               "name":"Antenna",
               "uri":"/20131021/lineups/USA-OTA-60030"
            }
         ]
      },
      {  
         "headend":"4DTV",
         "type":"Satellite",
         "location":"USA",
         "lineups":[  
            {  
               "name":"4DTV",
               "uri":"/20131021/lineups/USA-4DTV-DEFAULT"
            }
         ]
      }
   ]
}
rkulagowski commented 9 years ago

I've updated the response in API 20141201. Can you let me know if this one particular call makes it easier to parse the JSON directly now?

rkulagowski commented 9 years ago

The response has been updated per https://github.com/SchedulesDirect/JSON-Service/wiki/API-20141201#obtain-the-list-of-headends-in-a-postal-code