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: 
JinTheOne
Newbie

[Bug] Data corruption when using roRegistrySection data

The idea was to use the registrySection to save bookmark data and then use it to fill a rowlist with it to create elements that, when selected, would start playing the content, but when trying to pass the itemContent to an associative array, some of the data gets lost (either turned into "" or to invalid), and furthermore, when trying to pass this array to a function that configures the player, the array gets turned into invalid

I am stumped

0 Kudos
4 REPLIES 4
RokuBen
Community Moderator
Community Moderator

Re: [Bug] Data corruption when using roRegistrySection data

How are you converting your data into a string value to store in the registry?

0 Kudos
JinTheOne
Newbie

Re: [Bug] Data corruption when using roRegistrySection data

 

I fill an object with the data and then:

    sec.Write(contentId, FormatJson(bookMarkData))

On the other side I get the object back with:

    sec = createObject("roRegistrySection", "VOD")
    keys = sec.GetKeyList()
    for each key in keys

        bookmarkData = ParseJson(sec.Read(key))

    end for

 

0 Kudos
RokuBen
Community Moderator
Community Moderator

Re: [Bug] Data corruption when using roRegistrySection data

Try printing out the FormatJSON result and seeing if your data is properly handled.  As https://developer.roku.com/docs/references/brightscript/language/global-utility-functions.md#formatj... notes, not all data types in BrightScript can be represented.

 

0 Kudos
JinTheOne
Newbie

Re: [Bug] Data corruption when using roRegistrySection data

The data seems to be properly handled, to the point of filling a row of the rowList, it gets created correctly, the element is shown on screen and all that; it's when selecting the element that trying to fill a video component with said data fails because the some of the data gets assigned "" or invalid

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.