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