Fix for issue #260, Deserialize xml for Windows Phone #261

merged 1 commit into from Dec 23, 2012

2 participants

    private static object Deserialize(string xml, Type type, XmlDictionaryReaderQuotas quotas)

StringReader stringReader = new StringReader(xml);
using (var reader = XmlDictionaryReader.Create(stringReader))
var serializer = new DataContractSerializer(type);
return serializer.ReadObject(reader);


I discovered an error in the way the ServiceStack.Text Deserialize method works on Windows Phone. It passes in xml as a string to create the XmlDictionaryReader. The create method thinks the string is a Uri and then can't find the file. So it needs to create a StringReader object first and then it can create correctly.

@mythz mythz merged commit a2e297d into ServiceStack:master Dec 23, 2012
ServiceStack member

Cool, thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment