feat(JsonExtensions): create to be able to make fluent Json serilization

This commit is contained in:
2025-09-10 15:55:56 +02:00
parent e990a466aa
commit 95b54fa1f1
6 changed files with 33 additions and 14 deletions

View File

@@ -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);
}