mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-13 03:35:04 +00:00
fix: for backwards json compatibility, if get type fails, try again after stripping assembly suffixes
This commit is contained in:
@@ -71,6 +71,12 @@ namespace ICD.Common.Utils.Json
|
||||
string itemString = (string)token.SelectToken(ITEM_TOKEN);
|
||||
Type type = Type.GetType(typeString);
|
||||
|
||||
if (type == null)
|
||||
{
|
||||
typeString = typeString.Replace("_SimplSharp", "").Replace("_NetStandard", "");
|
||||
type = Type.GetType(typeString);
|
||||
}
|
||||
|
||||
return JsonConvert.DeserializeObject(itemString, type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user