<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