logo

Live Production Software Forums


Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
kjones9999  
#1 Posted : Thursday, August 24, 2017 9:09:03 PM(UTC)
kjones9999

Rank: Advanced Member

Groups: Registered
Joined: 8/20/2014(UTC)
Posts: 388

Thanks: 29 times
Was thanked: 80 time(s) in 51 post(s)
Trying to get JSON data working with a national score providing service, but I get the above error. Anyone see an issue with the JSON?

{"jsonrpc":"2.0","result":{"teamIds":[4014],"collections":{"teamCollection":{"list":[{"teamId":4014,"teamName":"Mckeel Academy Of Technology","mascot1":"Wildcats","color1Id":1000,"color2Id":1080,"color3Id":1320,"isOfficialTeam":1,"hideLevel":0,"levelOfPlayId":1000,"organizationId":1000,"defaultSquadId":1010,"squadListIsLocked":1,"varsityLetter":"M","acronymTeamName":"MAT","minTeamName":"Mckeel Academy Of Tech","shortTeamName":"Mckeel Academy Of Technology","apTeamName":"McKeel Academy","colloquialTeamName":"Mckeel Academy Of Technology","locationId":82320,"city":"Lakeland","state":"FL","country":"US","latitude":28.049593,"longitude":-81.984059,"officialTeamName":"Mckeel Academy Of Technology","relativeUrl":"/team/mckeel-academy-of-technology-wildcats-4014","url":"https://scorestream.com/team/mckeel-academy-of-technology-wildcats-4014","backgroundTeamPictureIds":[],"mascotTeamPictureIds":[],"squadIds":[1010,1020,1030,1040,1050,1060]}]},"squadCollection":{"list":[{"squadId":1010,"gender":"boys","level":"High School Varsity","shortLevel":"Varsity","minLevel":null,"sortOrder":1010,"gameCardDisplay":"Boys Varsity {sport}","scoreboardDisplay":"Boys Varsity {sport}","selectionDisplay":"Boys High School Varsity","spgDisplayLong":"Boys Varsity {sport}","spgDisplayShort":"Boys HS{sportAbbreviation}","spgDisplayMin":"B{sportAbbreviation}","display":"Boys High School Varsity","shortDisplay":"Boys Varsity","parentOrganizationId":1000},{"squadId":1020,"gender":"boys","level":"High School JV","shortLevel":"JV","minLevel":null,"sortOrder":1020,"gameCardDisplay":"Boys JV {sport}","scoreboardDisplay":"Boys JV {sport}","selectionDisplay":"Boys High School JV","spgDisplayLong":"Boys JV {sport}","spgDisplayShort":"Boys HS{sportAbbreviation}","spgDisplayMin":"B{sportAbbreviation}","display":"Boys High School JV","shortDisplay":"Boys JV","parentOrganizationId":1000},{"squadId":1030,"gender":"boys","level":"High School Freshman","shortLevel":"Freshman","minLevel":null,"sortOrder":1030,"gameCardDisplay":"Boys Freshman {sport}","scoreboardDisplay":"Boys Freshman {sport}","selectionDisplay":"Boys High School Freshman","spgDisplayLong":"Boys Freshman {sport}","spgDisplayShort":"Boys HS{sportAbbreviation}","spgDisplayMin":"B{sportAbbreviation}","display":"Boys High School Freshman","shortDisplay":"Boys Freshman","parentOrganizationId":1000},{"squadId":1040,"gender":"girls","level":"High School Varsity","shortLevel":"Varsity","minLevel":null,"sortOrder":1040,"gameCardDisplay":"Girls Varsity {sport}","scoreboardDisplay":"Girls Varsity {sport}","selectionDisplay":"Girls High School Varsity","spgDisplayLong":"Girls Varsity {sport}","spgDisplayShort":"Girls HS{sportAbbreviation}","spgDisplayMin":"G{sportAbbreviation}","display":"Girls High School Varsity","shortDisplay":"Girls Varsity","parentOrganizationId":1000},{"squadId":1050,"gender":"girls","level":"High School JV","shortLevel":"JV","minLevel":null,"sortOrder":1050,"gameCardDisplay":"Girls JV {sport}","scoreboardDisplay":"Girls JV {sport}","selectionDisplay":"Girls High School JV","spgDisplayLong":"Girls JV {sport}","spgDisplayShort":"Girls HS{sportAbbreviation}","spgDisplayMin":"G{sportAbbreviation}","display":"Girls High School JV","shortDisplay":"Girls JV","parentOrganizationId":1000},{"squadId":1060,"gender":"girls","level":"High School Freshman","shortLevel":"Freshman","minLevel":null,"sortOrder":1060,"gameCardDisplay":"Girls Freshman {sport}","scoreboardDisplay":"Girls Freshman {sport}","selectionDisplay":"Girls High School Freshman","spgDisplayLong":"Girls Freshman {sport}","spgDisplayShort":"Girls HS{sportAbbreviation}","spgDisplayMin":"G{sportAbbreviation}","display":"Girls High School Freshman","shortDisplay":"Girls Freshman","parentOrganizationId":1000}]},"teamPictureCollection":{"list":[]}}}}
stigaard  
#2 Posted : Friday, August 25, 2017 1:19:23 AM(UTC)
stigaard

Rank: Advanced Member

Groups: Registered
Joined: 5/20/2015(UTC)
Posts: 493
Man
Denmark
Location: Copenhagen, Denmark

Thanks: 389 times
Was thanked: 100 time(s) in 79 post(s)
The data must be passed as an array, and not a object. Since datasources can read instances.

You need to wrap your data as: [ DATA OBJECT ]
kjones9999  
#3 Posted : Friday, August 25, 2017 3:57:16 PM(UTC)
kjones9999

Rank: Advanced Member

Groups: Registered
Joined: 8/20/2014(UTC)
Posts: 388

Thanks: 29 times
Was thanked: 80 time(s) in 51 post(s)
Thanks!

So if this is the feed url, I would need to pass it through PHP? Or what would be the best way to take the url and format it as useable JSON?
stigaard  
#4 Posted : Friday, August 25, 2017 5:00:14 PM(UTC)
stigaard

Rank: Advanced Member

Groups: Registered
Joined: 5/20/2015(UTC)
Posts: 493
Man
Denmark
Location: Copenhagen, Denmark

Thanks: 389 times
Was thanked: 100 time(s) in 79 post(s)
kjones9999 wrote:
Thanks!

So if this is the feed url, I would need to pass it through PHP? Or what would be the best way to take the url and format it as useable JSON?


There's many options. If you already have PHP installed, you can pretty easily setup a PHP script that fetches the remote data and wraps it in an array and returns that as JSON, which is then readable by vMix datasources.
Cormac  
#5 Posted : Thursday, October 26, 2017 11:01:27 AM(UTC)
Cormac

Rank: Advanced Member

Groups: Registered
Joined: 3/21/2016(UTC)
Posts: 77
Location: Belfast

Thanks: 9 times
Was thanked: 3 time(s) in 3 post(s)
Hello
did you ever get this to work and if so would you mind giving us a some details please.I would love to do this.
Regards
Cormac
kjones9999  
#6 Posted : Friday, October 27, 2017 7:44:54 PM(UTC)
kjones9999

Rank: Advanced Member

Groups: Registered
Joined: 8/20/2014(UTC)
Posts: 388

Thanks: 29 times
Was thanked: 80 time(s) in 51 post(s)
No-- I eventually went another route because it was not doable.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.