feat(JsonExtensions): create to be able to make fluent Json serilization
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class JsonExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="options"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToJson(this object obj, JsonSerializerOptions? options = null)
|
||||
=> JsonSerializer.Serialize(obj, options);
|
||||
}
|
||||
Reference in New Issue
Block a user