Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
hugetv
Level 7

help this json

hi all is that I have a json with this content
{"live":{"titulo":"Beetlejuice","inicio":"12:40PM","final":"2:15PM","avance":1,"hora_actual":"07:03pm"},"next":{"titulo":"The Fight Game With Jim Lampley","inicio":"2:15PM","final":"2:45PM"}}


    jsonRequest = CreateObject("roUrlTransfer")
jsonRequest.SetURL("http://"+initConfig()+"/epg.php?ch="+m.ID)
json = ParseJson(jsonRequest.GetToString())

live = json.live
next = json.next ' linea 276


this error

Syntax Error. (compile error &h02) in pkg:/source/LTV/VideoPlayer.brs(276)
Syntax Error. (compile error &h02) in pkg:/source/TV/VideoPlayer.brs(341)
Syntax Error. (compile error &h02) in pkg:/source/TV/VideoPlayer.brs(342)
Syntax Error. (compile error &h02) in pkg:/source/TV/VideoPlayer.brs(343)
Syntax Error. (compile error &h02) in pkg:/source/TV/VideoPlayer.brs(344)
Our system http://www.rokumanager.com
0 Kudos
2 Replies
belltown
Level 7

Re: help this json

'next' is a reserved word in BrightScript. Use something like 'nextJson' instead.
https://github.com/belltown/
0 Kudos
hugetv
Level 7

Re: help this json

OK thanks
Our system http://www.rokumanager.com
0 Kudos