Reputation: 1091
In addition ,I would recommend that please refer the link below for a similar thread which provides some solutions for the same issue.
Problem deserializing JSON in a Silverlight program
Hope it can help you.
Upvotes: 1
Views: 112
Reputation: 6101
You should use DataContractJsonSerializer for json deserialization and HttpWebRequest for getting data purposes.
Here is a piece of my code where I'm using DataContractJsonSerializer:
//...
if (CheckError((HttpWebResponse) webResponse)) return;
var serializer = new DataContractJsonSerializer(typeof(Message[]), new[] { typeof(Message) });
var stream = webResponse.GetResponseStream();
_networkMessages = (Message[])serializer.ReadObject(stream);
//...
Upvotes: 1