I've been using the DataContractJsonSerializer class to send data from a Silverlight 4 control to the server (currently as a serialized string via Http Post at the moment). The class in question serializes great on the silverlight / client side but deserializing back has been a problem on the server. The closest I've gotten is inclusion of System.Runtime.Serialization and System.ServiceModel.Web. Interesting enough it won't compile without Runtime.Serialization even though it says it should. If I add the assembly reference I get a this exception:
due to error: System.TypeLoadException: Could not load type 'System.Runtime.Versioning.TargetFrameworkAttribute' from assembly 'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.\r\n
All I'm basically trying to do is rebuild a simple data class from a json string built out by the silverlight control. Any help would greatly be appreciated!
Thanks,
Sieg