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: 
youssefsherif
Streaming Star

how to create a rowlist and import data from a json file

how can i create a rowlist and import the data from a json file?

i would like the rowlist item to have 2 labels and a poster that are loaded from the json file 

how can i set the data from the json file to it

0 Kudos
5 REPLIES 5
philanderson777
Roku Guru

Re: how to create a rowlist and import data from a json file

 

 

You have to 

1) create background task

2) gather the XML or JSON data and parse it (from the internet) and then put that data into the 'contentNode' of whatever object you are rendering.  Final step is to set the contentNode of your component equal to the contentNode containing all of your gathered data.

 

this is quite a complex all-in-one example ...

 

https://gist.github.com/timbeynart-nbcuni/c73989ff347b101ef4176b8c104f82af

 

0 Kudos
philanderson777
Roku Guru

Re: how to create a rowlist and import data from a json file

This one illustrates the super-simple contentNode principle for a video player

 

https://community.roku.com/t5/Roku-Developer-Program/VideoExample-playing-from-json/td-p/507410

0 Kudos
philanderson777
Roku Guru

Re: how to create a rowlist and import data from a json file

This one illustrates how to do it if all of the json data was already held locally and was static

 

https://community.roku.com/t5/Roku-Developer-Program/task-node-data-loading-from-a-json-file/td-p/84...

 

0 Kudos
philanderson777
Roku Guru

Re: how to create a rowlist and import data from a json file

0 Kudos