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: 
Highlighted
jhalickman
Level 7

JSON support

Is there any support for using JSON instead of XML in the SDK?
0 Kudos
5 Replies
bcl
Level 7

Re: JSON support

I've been wondering this as well. Or YAML. Parsing large amounts of XML seem to take a long time. ie. I have about 300 movies in my home stream, with minimal info in each node, and it takes it about 3 seconds to parse. The videoplayer example also appears to re-parse when you select an individual movie but that's just a app design issue (ie. the server should be dynamic instead of static files like I am currently using and only serve up the title's detailed info at that time).

I also see in the XML a mention of pages, but haven't seen any examples of this being used. eg. breaking the list up into chunks and only serving up what is needed for several screens worth.
0 Kudos
AngryMan
Level 7

Re: JSON support

"bcl" wrote:
I've been wondering this as well. Or YAML. Parsing large amounts of XML seem to take a long time. ie. I have about 300 movies in my home stream, with minimal info in each node, and it takes it about 3 seconds to parse. The videoplayer example also appears to re-parse when you select an individual movie but that's just a app design issue (ie. the server should be dynamic instead of static files like I am currently using and only serve up the title's detailed info at that time).

I also see in the XML a mention of pages, but haven't seen any examples of this being used. eg. breaking the list up into chunks and only serving up what is needed for several screens worth.


I would think that a list of 300 movies is more than you could display on screen. You could implement a search screen and capture screen events (roMessagePort) to determine when to get the next or previous "page" search results. You could also just display the movies alphabetically, 10 or so at a time. I would think that parsing more than 10 results at a time is just wasted effort.

From another thread...
"RokuDaveW" wrote:
Check out the feedPagable.brs in the youtube application for an example on how you'd do this type of processing.


Keep us posted... I'm curious to see what you come up with.
0 Kudos
bbefilms
Level 7

Re: JSON support

"AngryMan" wrote:
From another thread...
"RokuDaveW" wrote:
Check out the feedPagable.brs in the youtube application for an example on how you'd do this type of processing.


hmm.. there isn't a youtube app in the current public SDK, nor a feedPagable.brs, this must be available to specific partners - why is this not availabe in the public SDK?
0 Kudos
AngryMan
Level 7

Re: JSON support

"bbefilms" wrote:
"AngryMan" wrote:
From another thread...
"RokuDaveW" wrote:
Check out the feedPagable.brs in the youtube application for an example on how you'd do this type of processing.


hmm.. there isn't a youtube app in the current public SDK, nor a feedPagable.brs, this must be available to specific partners - why is this not availabe in the public SDK?


Sorry about that... I thought I saw a Youtube app in the SDK. Anyway, RokuDaveW explains roughly how it should work here: http://forums.rokulabs.com/viewtopic.php?t=22547
0 Kudos
Shlepzig
Level 7

YouTube

There was a You Tube icon as a channel in some of the early leaks regarding the channel store release.

It is not in any of the SDK information that was released publicly.

-Shlep
0 Kudos