views:

176

answers:

2

I know I can call javascript and pass string values from Silverlight, but can I pass a JSON object or does it have to be serialized?

+1  A: 

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

Andy E
A: 

The full answer to this question can be found at:

http://stackoverflow.com/questions/2295859/silverlight-passing-json-object-incorrectly

AWC