Skip to reading
The Variable Designer

Arrays: exact JSON or a quick text list?

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView illustrations

Initial Array Value accepts either a JSON array or a simple separated list. The quick form is convenient for text labels, but it does not preserve numeric and Boolean types.

Source table from Arrays: exact JSON or a quick text list?, page 12
What you enterWhat is stored
gear, 2, trueThree Strings: "gear", "2", "true".
["gear", 2, true]A String, a Number and a Boolean.
[]An empty Array.
An empty Array input fieldAn empty Array. Leave Blank At Start would be null instead.

Figure 8. Raw JSON after entering a comma-separated list. Both 2 and true are quoted: they are text.

Figure 9. The same example entered as valid JSON. The unquoted 2 and true retain their Number and Boolean types.

Commas, semicolons and line breaks can separate the quick text form. For mixed data, use valid JSON. A malformed JSON array can fall back to text splitting, so inspect the saved record if the result looks wrong. Validation checks the outer Array type, not the meaning of every member.

Page 12 of 37Permalink
Go to page