Clone JsonSerializerOptions before passing to context
This commit is contained in:
@@ -17,6 +17,6 @@ public class JsonConfigurationFileReader : IConfigurationFileReader
|
||||
if (!File.Exists(fileName)) return (null, null);
|
||||
|
||||
await using FileStream openStream = File.OpenRead(fileName);
|
||||
return ((T?)await JsonSerializer.DeserializeAsync(openStream, typeof(T), contextGenerator(DefaultOptions)), fileName);
|
||||
return ((T?)await JsonSerializer.DeserializeAsync(openStream, typeof(T), contextGenerator(new JsonSerializerOptions(DefaultOptions))), fileName);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user