The actual deserialization code in mojoPortal is like this:
public static object DeserializeFromString(Type type, string serializedObject)
{
using(XmlTextReader reader = new XmlTextReader(new StringReader(serializedObject)))
{
XmlSerializer serializer = new XmlSerializer(type);
return serializer.Deserialize(reader);
}
}
It makes no sense whatsoever to need to change it as that guy suggested, it would look like this:
public static object DeserializeFromString(Type type, string serializedObject)
{
using(XmlTextReader reader = new XmlTextReader(new StringReader(serializedObject)))
{
XmlSerializer serializer = new XmlSerializer(type);
if (!serializer.CanDeserialize(reader))
{
serializer = new XmlSerializer(type);
}
return serializer.Deserialize(reader);
}
}
It doesn't make sense at all and I don't believe that would solve any problem. No-one on that thread confirmed it as a solution, and in the case of my code we just created the XmlSerializer instance there is no benefit to do it again.
As I said before we have no conclusive evidence that this code is even the cause of the problem, if it was the cause the solution I already linked would solve it.
Best,
Joe