Project: titanium
Issue TIMOB-19181: Windows: Implement toJSON for Titanium proxy classes
Calling JSON.stringify(proxy) on a Titanium proxy results in an error. We can control the JSON representation that a custom class returns by having a special toJSON() function that returns a JSObject, which is then converted internally by JSC into JSON. https://github.com/appcelerator/webkit/blob/master/Source/JavaScriptCore/runtime/JSONObject.cpp#L328 Even if we can't get a great initial representation, we may be able to simply return undefined and avoid this runtime error?
Story points: 8