JsonParser: Ignore errors converting to property type.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user