mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Nullability fix. Removed unused json parameters
This commit is contained in:
parent
18d5f56f52
commit
3b0e10c86d
@ -59,16 +59,12 @@ namespace Wabbajack.Common
|
||||
return JsonConvert.SerializeObject(obj, JsonSettings);
|
||||
}
|
||||
|
||||
public static T FromJson<T>(this AbsolutePath filename,
|
||||
TypeNameHandling handling = TypeNameHandling.All,
|
||||
TypeNameAssemblyFormatHandling format = TypeNameAssemblyFormatHandling.Full)
|
||||
public static T FromJson<T>(this AbsolutePath filename)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(filename.ReadAllText(), JsonSettings)!;
|
||||
}
|
||||
|
||||
public static T FromJsonString<T>(this string data,
|
||||
TypeNameHandling handling = TypeNameHandling.Objects,
|
||||
TypeNameAssemblyFormatHandling format = TypeNameAssemblyFormatHandling.Full)
|
||||
public static T FromJsonString<T>(this string data)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<T>(data, JsonSettings)!;
|
||||
}
|
||||
@ -78,10 +74,8 @@ namespace Wabbajack.Common
|
||||
using var tr = new StreamReader(stream, Encoding.UTF8, leaveOpen: true);
|
||||
using var reader = new JsonTextReader(tr);
|
||||
var ser = JsonSerializer.Create(JsonSettings);
|
||||
return ser.Deserialize<T>(reader);
|
||||
return ser.Deserialize<T>(reader)!;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private class HashJsonConverter : JsonConverter<Hash>
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user