How to Seralize Python Object to PropertyTreeScriptWrapper$ArrayWrapper

We are trying to create some automated testing for some of our common code and are running into difficulty creating the serialized objects that the designer uses when values accessed via the custom properties. For example one object we need to test our code with is com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ArrayWrapper and looking at the java docs it seems like all these serialized objects implement java.io.Serializable so I wondering if there's any easy(probably not) way to go from the python object to this? We are doing this from doGet in webdev so that may defeat our purpose entirely since we won't be in perspective at all.

Can you expand a little bit more on why you're trying to do this? From a general ignition scripting context you should be able to assign any random dictionary to any of Perspective's property trees.

Yeah no problem, we have a library of code that we will use in literally every project, one function for example is convert_properties_to_dictionary which can take a perspective property tree object and give back the the python object.. We are coming up with a standard way of verifying this function works across ignition versions, any additions we might add in the future, etc. For our test cases we just want to know how to create that property tree object through script essentially.

That isn't actually possible, as Perspective takes any java or jython object and makes a wrapper, discarding the original object (if not held elsewhere). You might find my Integration Toolkit module's unQualify() functions useful.

If you want to retain the original jython/java object, your might find my Perspective session-, page-, and viewVarMap() functions helpful.