@ggross @cmallonee Can you comment whether these bugs apply to my situation?
I have a script that generates a python list with dictionaries (multiple levels). When I output this object and bind that to a “label” component for example, the result is a valid JSON string. The same works when binding directly to the “items” property of a Perspective MenuTree component.
I am now trying to feed the output to a Document-type memory tag by using system.util.jsonEncode() on my python object, but am getting the maximum recursion depth error.
Below is a JSON representation of an object that works with jsonEncode() and one that breaks it. It appears the issue is that jsonEncode() can’t handle the depth of the object properly:
Works with jsonEncode()
[{"visible":"true","showHeader":"true","navIcon":{"path":"material/chevron_right","color":"#6C6C6C"},"style":{"classes":""},"label":{"icon":{"path":"material/domain"},"text":"Plant1"},"items":[{"visible":"true","showHeader":"true","navIcon":{"path":"","color":"#6C6C6C"},"style":{"classes":""},"label":{"icon":{"path":"material/place"},"text":"Line1"},"items":[],"enabled":"true","target":""}],"enabled":"true","target":""}]
Breaks jsonEncode()
[{"visible":"true","showHeader":"true","navIcon":{"path":"material/chevron_right","color":"#6C6C6C"},"style":{"classes":""},"label":{"icon":{"path":"material/domain"},"text":"Plant1"},"items":[{"visible":"true","showHeader":"true","navIcon":{"path":"material/chevron_right","color":"#6C6C6C"},"style":{"classes":""},"label":{"icon":{"path":"material/place"},"text":"Line1"},"items":[{"visible":true,"showHeader":true,"navIcon":{"path":"material/chevron_right","color":"#6C6C6C"},"style":{"classes":""},"label":{"icon":{"path":"material/folder_open"},"text":"7xx - "},"items":[{"visible":true,"showHeader":true,"navIcon":{"path":"material/wifi_off","color":"#6C6C6C"},"stationTagRoot":{"fullPath":"[default]Test/Plant1/Line1/701","hasChildren":false,"name":"701","tagType":"Folder"},"style":{"classes":""},"label":{"icon":{"path":""},"text":"701 - Disconnected"},"items":[],"enabled":true,"target":""}],"enabled":true,"target":""}],"enabled":"true","target":""}],"enabled":"true","target":""}]