# How to verify if parameter is of type list or JsonifiableArrayList?

**URL:** <https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 19, 2025, 7:06pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921 "2025-12-19T19:06:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noah\_Gilgo](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@Noah\_Gilgo](https://forum.inductiveautomation.com/u/Noah_Gilgo)\
**Post date:** [December 19, 2025, 7:06pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/1 "2025-12-19T19:06:17Z")

</div>

I want to verify that the data being received by a binding transform is in the form of either a list or a JsonifiableArrayList, since that seems to be the type that common array properties are stored as.

I’ve been trying to access the data type like so:

`from com.inductiveautomation.perspective.gateway.script import JsonifiableArrayList`

However, when I try to access the JsonifiableArrayList class to compare the data’s type to, I get the following error:

`ImportError: No module named perspective`

I verified that this class is in my environment with the supplied package path, so I have no idea why this is happening.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/2/42badeff02b399e59c44388fd890114618b2b62b.png)

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 19, 2025, 8:20pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/2 "2025-12-19T20:20:23Z")

</div>

> [@Noah\_Gilgo](#):
>
> I verified that this class is in my environment

How did you do this?

(Gateway modules are loaded into classloaders isolated from each other and inaccessible to scripts.)

---

<div class="post-metadata">

**Author:** ![Noah\_Gilgo](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@Noah\_Gilgo](https://forum.inductiveautomation.com/u/Noah_Gilgo)\
**Post date:** [December 19, 2025, 9:51pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/3 "2025-12-19T21:51:41Z")

</div>

I made a property binding to an empty array, then added a script transform that just returned the type of the array.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 19, 2025, 9:53pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/4 "2025-12-19T21:53:30Z")

</div>

Right. Perspective itself has full access to its own classes. Scripts to not have access via classloader/import, only via objects Perspective hands to them.

---

<div class="post-metadata">

**Author:** ![Noah\_Gilgo](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@Noah\_Gilgo](https://forum.inductiveautomation.com/u/Noah_Gilgo)\
**Post date:** [December 19, 2025, 9:56pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/5 "2025-12-19T21:56:09Z")

</div>

I see, thank you.

Is there a typical standard for verifying that a value being received by a script transform is a list? Is the typical approach just to check if the value is iterable but not a string or a dictionary?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 19, 2025, 9:59pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/6 "2025-12-19T21:59:33Z")

</div>

Yes. Check `hasattr(obj, 'items')` to catch dictionaries, then `hasattr(obj, ' __iter__')` to identify iterables, then check for strings.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [December 19, 2025, 10:27pm UTC](https://forum.inductiveautomation.com/t/how-to-verify-if-parameter-is-of-type-list-or-jsonifiablearraylist/112921/7 "2025-12-19T22:27:29Z")

</div>

This is the way. Check if it's list like (but not a string or dictionary), _don't_ try to guarantee which type you're actually receiving. Ignition scripting methods may choose to return a Java array, a Java list, a special Java object that acts as a distinct Python class, or anything else; any strict isinstance check is only going to lead to headaches down the road.
