Our Flex web application uses RemoteObject connections to send a custom class object to PHP. This object has multiple depth levels, with nested objects inside the main one. We found a limit on the number of nested levels allowed, no matter how complex is the object. When reached, the serialization made by the RemoteObject before sending the data crashes with this error:
TypeError: Error #1034: Type Coercion failed: cannot convert Object@7e30f89 en mx.messaging.messages.IMessage.
If we send a lighter object (removing all of its properties), the same occurs. In example:
var params:Object = {};
params['test'] = {0:{1:{2:{3:{4:{5:{6:{7:{8:{9:{10:{11:{12:{13:{14:{15:{16:{17:{18:{19:{20:{21:{22:{}}}}}}}}}}}}}}}}}}}}}}}};
remoteObject.runService(params);
If the object has less levels, it works:
params['test'] = {0:{1:{2:{3:{4:{5:{6:{7:{8:{9:{10:{11:{12:{13:{14:{15:{16:{17:{18:{19:{20:{21:{}}}}}}}}}}}}}}}}}}}}}}};
What it seems is that the RemoteObject allows a maximum nested levels depth of 24, maybe 23. After that, it crashes. Sending in JSON is not an option, as I lose all the typed classes and objects inside the main object.
Does anyone have any idea on how to face this?
Thanks in advance!