JsonParser: Ignore errors converting to property type.

This commit is contained in:
2020-09-07 00:33:08 +02:00
parent d3c6e34350
commit 76a8e350e6

View File

@@ -91,9 +91,16 @@ namespace VAR.Json
valueDest = new Guid((string)valueOrig);
}
else
{
try
{
valueDest = Convert.ChangeType(obj[prop.Name], effectiveType);
}
catch (Exception)
{
continue;
}
}
prop.SetValue(newObj, valueDest, null);
}
}