Hello everyone,
I'm new on Roku plateform and I have some questions about XML component functionality !
I am getting a json with roUrlTransfer, and I printed correctly inside value.
Function getJson() As Object
searchRequest = CreateObject("roUrlTransfer")
searchRequest.SetCertificatesFile("common:/certs/ca-bundle.crt")
searchRequest.AddHeader("X-Roku-Reserved-Dev-Id", "")
searchRequest.InitClientCertificates()
searchRequest.SetURL("https://api.tfoumax.fr/catalog/home")
response = ParseJson(searchRequest.GetToString())
return response
End Function
But I wanted to use json response object in XML component file, like:
<?xml version="1.0" encoding="utf-8" ?>
<component name = "myrowlist" extends = "ContentNode" >
<script type = "text/brightscript" uri = "pkg:/source/getJson.brs" />
<script type="text/brightscript" >
<![CDATA[
sub init()
response = getJson()
end sub
]]>
</script>
</component>
But the program is stuck at response = getJson line, anyone have an alternative to use my json inside graph XML ?
Thanks in advance !
Max