Component properties in Perspective are structured as JSON. However, interacting with them does not require any kind of specialized knowledge. Critically, every property in Perspective is one of three types:
Type | Description | Example | |
---|---|---|---|
Value | A value is a simple piece of data, usually a number or string. Assigning a value to a value property is just like assigning a value to an ordinary Python variable. |
| |
Object | An object is structured like a Python Dictionary, holding any number of key:value pairs. If you want to pass an object to an object property, you'll need to use the Python Dictionary type. Note that a Perspective Object could contain different kinds of sub datatypes. One of its keys could map to another object, or to an array. |
| |
Array | An array is structured like a Python List. Unlike an object, where each element in the data type has an associated key, in an array, each element only has a position. Note that a Perspective Array could contain different kinds of sub datatypes. Arrays can contain objects and other arrays. |
|
In scripting, we can use component properties and methods to access related components, and view and session info. See Perspective Component Methods for details.
Any property binding can make use of a Script Transform to apply any python script to the output value of the binding. For more information, see Transforms and Script Transforms.