Friday 15 February 2013

json - DataContractJsonSerializer repeated member -


While deserializing, I get this exception, I've checked the feed and "played" is not being repeated twice However, HP shows twice in response

[System.Runtime.Serialization.SerializationException] = {"Data Contract Type 'PlayerDetailsSeason' can not be deserialized because the data member plays 'from one in input' More often found. "}

I'm not sure why the HTM response showed twice in the message has gone.

Here is the code

  var httpRequest = new HttpRequestMessage (HttpMethod.Get, requestUrl + ConstructRequestContent (requestParams)); Var httpclient = new HTTP client (); HttpResponseMessage responseMessage = Wait httpClient.SendAsync (httpRequest); If (feedback message! = Null & feedback message .isuccessstatus code) {stream stream = waiting message feedback. material. ReadStream async (); Data ContractJason Serializer deserializer = New Data ContrastJason Serializer (Typef (T)); String contentresponsestr = Wait for the response. message. Content RedAssressingSync ();   

// After checking the content, I can see that "played" member has shown twice, why is it showing twice? Result = (t) deserializer. Reed object (stream); } Return results; } Hold (exception before) {return result; }

Done duplicate a feed problem detected strange, chrome and many other Jason Values Do not check data members.

No comments:

Post a Comment