I know I can call javascript and pass string values from Silverlight, but can I pass a JSON object or does it开发者_Go百科 have to be serialized?
If you make the object have [ScriptableType]
and pass it in your arguments, you can achieve what you're trying to do without encoding the object to JSON and decoding on the JS side:
See the heading Return Objects From Silverlight Method Calls To JavaScript at http://pietschsoft.com/post/2008/06/19/Silverlight-and-JavaScript-Interop-Basics.aspx
The full answer to this question can be found at:
Silverlight passing JSON object incorrectly?
精彩评论