Add File validation (#344)
* Add file validation * Revert "Added checks.dat build script (#343)" This reverts commit 39228f88e705b58858d162256a5b5e10fe99148c. * Update to use pwsh * Wrap code in using
This commit is contained in:
@@ -154,6 +154,16 @@ public class JsonUtil
|
||||
return await JsonSerializer.DeserializeAsync(fs, type, jsonSerializerOptionsNoIndent);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert JSON into an object from a MemoryStream asynchronously
|
||||
/// </summary>
|
||||
/// <param name="fs">The memory stream to deserialize</param>
|
||||
/// <returns>T</returns>
|
||||
public async Task<T?> DeserializeFromMemoryStreamAsync<T>(MemoryStream ms)
|
||||
{
|
||||
return await JsonSerializer.DeserializeAsync<T>(ms, jsonSerializerOptionsNoIndent);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convert an object into JSON
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user