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

@@ -92,7 +92,14 @@ namespace VAR.Json
} }
else else
{ {
valueDest = Convert.ChangeType(obj[prop.Name], effectiveType); try
{
valueDest = Convert.ChangeType(obj[prop.Name], effectiveType);
}
catch (Exception)
{
continue;
}
} }
prop.SetValue(newObj, valueDest, null); prop.SetValue(newObj, valueDest, null);
} }