# Function to convert json string or python dict into ObjectWrapper

**URL:** <https://forum.inductiveautomation.com/t/function-to-convert-json-string-or-python-dict-into-objectwrapper/32861>\
**Category:** Ignition\
**Created:** [March 5, 2020, 10:45pm UTC](https://forum.inductiveautomation.com/t/function-to-convert-json-string-or-python-dict-into-objectwrapper/32861 "2020-03-05T22:45:39Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [May 5, 2021, 4:15pm UTC](https://forum.inductiveautomation.com/t/function-to-convert-json-string-or-python-dict-into-objectwrapper/32861/8 "2021-05-05T16:15:04Z")

</div>

@paul-griffith  
I’m trying to do this as well. I have a custom param that’s an Object with this format:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/d/0d9434047510d07462d931857ecc8e7a09775127.png)

When I use dict() to convert to a dict, the base controlAccess works fine, but its key values are still ObjectWrappers. I assume i’m going to have to loop through it and convert all ObjectWrappers into dicts?

I’ve just tried this and I can’t import the object:  
`import com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper`

With the error:  
`ImportError: No module named perspective`

v8.1.5

This works, but yuck!  
`str(type(dict(self.view.custom.controlAccess)['racking'])) == "<type 'com.inductiveautomation.perspective.gateway.script.PropertyTreeScriptWrapper$ObjectWrapper'>"`

---

_[View the full topic](https://forum.inductiveautomation.com/t/function-to-convert-json-string-or-python-dict-into-objectwrapper/32861)._
