<field id="headers" type="assocarray" value="{}" />
<field id="headers" type="assocarray" value="{test: value}" />
<field id="headers" type="assocarray" value='{test: "value"}' />
<field id="headers" type="assocarray" value='{"test": "value"}' />
<field id="headers" type="assocarray" value="{test: \"value\"}" />
<field id="headers" type="assocarray" value="{\"test\": \"value\"}" />
"owen777" wrote:
Hey, what's the correct way of setting default assocarray field's value in XML? Is there any? I'm able to set only an empty object via:<field id="headers" type="assocarray" value="{}" />
but none of the following works:<field id="headers" type="assocarray" value="{test: value}" />
<field id="headers" type="assocarray" value='{test: "value"}' />
...
<field id="headers" type="assocarray" value="{myint: 123, mystr:"abc"}" />
"RokuKC" wrote:
To embed a double quotation mark (") in an XML attribute, you need to escape it as """
E.g.<field id="headers" type="assocarray" value="{myint: 123, mystr:"abc"}" />
should work to set headers = {myint:123, mystr:"abc"}
<field id="headers" type="assocarray" value="{"Content-Type": "application/json", "Accept": "application/json"}" />
<field id="headers" type="assocarray" value="{Content-Type: "application/json", Accept: "application/json"}" />
"owen777" wrote:
Not really:<field id="headers" type="assocarray" value="{"Content-Type": "application/json", "Accept": "application/json"}" />
breaks the app
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!