Add GetOptions method to ISafeSerializer interface
This new method retrieves the JSON serializer options, enhancing flexibility in how JSON data is handled. It provides an additional way to customize serialization settings contextually.
This commit is contained in:
parent
7d45db355d
commit
750b4804fe
|
|
@ -59,4 +59,9 @@ public interface ISafeSerializer
|
|||
/// </summary>
|
||||
[RequiresUnreferencedCode("The type T may be trimmed.")]
|
||||
T Deserialize<T>(JsonElement element, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the JSON serializer options.
|
||||
/// </summary>
|
||||
JsonSerializerOptions GetOptions();
|
||||
}
|
||||
Loading…
Reference in a new issue