|
|
@ -56,19 +56,12 @@ public class ConnectedModelInfo |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static ConnectedModelInfo? FromJson(string json) |
|
|
|
public static ConnectedModelInfo? FromJson(string json) |
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
return JsonSerializer.Deserialize<ConnectedModelInfo>( |
|
|
|
return JsonSerializer.Deserialize<ConnectedModelInfo>( |
|
|
|
json, |
|
|
|
json, |
|
|
|
new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull } |
|
|
|
new JsonSerializerOptions { DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull } |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (JsonException) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return default; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Saves the model info to a json file in the specified directory. |
|
|
|
/// Saves the model info to a json file in the specified directory. |
|
|
|