url = CreateObject("roUrlTransfer")
rsp = url.GetToString()
response_as_associative_array = parseJSON(rsp)
destruk wrote:Note that "Artist" is not currently included in the scenegraph content node, so you would need to use addfield to add it during runtime if you want to use that.
<?xml version="1.0" encoding="UTF-8"?>
<component name="ContentItem" extends="ContentNode">
<field id="HLS_URL" type="string" />
<field id="MP3_URL" type="string" />
<field id="artist" type="string" />
destruk wrote:Good point Belltown -- if the firmware is altered to support Artist for a contentnode, would using the extended class cause a conflict or would adding the extra field this way simply be silently removed so the base class takes precedence?
<interface> fields accumulate: the extended component includes all of the interface fields of the component from which it is extended in addition to its own. In the case where an extended component field name is the same as the component from which it is extended, the definition of the extended component field is used, similar to functions.
destruk wrote:About a third of the utility/value of Roku is the ability to read content data from the internet. It can read rss / xml / json / txt, and any other format that you can retrieve and program the app to make sense of. When rebuilding the parsing routines, or modifying them to fit your content stream, speed is a key requirement. I haven't looked at the "hero grid" code, but it is extremely popular. If you put in a stop after the data is parsed, but before values are assigned, you can use the debugger to see what is there by printing the variable, and trying to get data out of the parsed array. Ideally, for a content node, you would want to use setfields() as it is the fastest way to push data into a content node but to do that your source feed tags/names need to match what a content node uses.
Note that "Artist" is not currently included in the scenegraph content node, so you would need to use addfield to add it during runtime if you want to use that.
https://sdkdocs.roku.com/display/sdkdoc ... +Meta-Data