Currently, we return the reference to the properties object in the toJSON method. This is bad as we trust callers not to modify the properties object (wrongly).
We cannot simply call JSON.parse(JSON.stringify(this.properties)) as this fails on circular references.
FWIW, this is what is causing the Dependency Manager's toSerializedForm to fail, as it is deleting properties on the toJSON object it gets back (which is currently actual properties objects.
Currently, we return the reference to the properties object in the toJSON method. This is bad as we trust callers not to modify the properties object (wrongly).
We cannot simply call
JSON.parse(JSON.stringify(this.properties))
as this fails on circular references.... options?