Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
babuhari123
Visitor

How to get json values from http url

Hi friends Iam Hari learning roku examples with brightscript
my problem is how to get values from json when http request is made

can any one know please help me
0 Kudos
3 REPLIES 3
gonzotek
Visitor

Re: How to get json values from http url

Have a look at librokudev, it has json builder and and parser functions in rdJSON.brs. The json functions depend on another function located in reSerialize.brs. It's under a BSD License, so if you use it, you have to give acknowledgement somewhere in your documentation, but you don't have to post your source anywhere if you don't want to

I'm using the parser function in something I've been working on, my json is simple, and it works for my purposes. I haven't tested it extensively with more complex json strings.

Also, questions like this will get more attention from developers if you ask them in the Developer Program area of the forum.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
babuhari123
Visitor

Re: How to get json values from http url

hai iam not getting json values from http request,
can u please send me sample code for getting json values from http request,
plzzzzzzzzz
0 Kudos
RokuJoel
Binge Watcher

Re: How to get json values from http url

The server would have to support returning data in JSON format. Usually there is a URL parameter that you can send or a header you can send to request the data in JSON or another format.

Currently, if the server supports XML format, you are better off using that, as the Roku will process XML natively, which is significantly faster than non-natively processing JSON

Nobody can help you here if they don't know what type of server or what service you are connecting to, as there is no generic way to request data in JSON, it is on a case by case basis. If you check out ProgrammableWeb.com you can look up the types of data that various services can return.

- Joel
0 Kudos