using Newtonsoft.Json; using Newtonsoft.Json.Serialization; #if NET using System.Text.Json; using System.Text.Json.Serialization; #endif namespace EnvelopeGenerator.Domain.Constants { public class Format { #region Json Serializer Settings public static class Json { //TODO: update to use System.Text.Json public static readonly JsonSerializerSettings ForDiagnostics = new JsonSerializerSettings() { ContractResolver = new CamelCasePropertyNamesContractResolver(), Formatting = Formatting.Indented, NullValueHandling = NullValueHandling.Include }; #if NET public static readonly JsonSerializerOptions ForAnnotations = new() { PropertyNamingPolicy = JsonNamingPolicy.CamelCase, WriteIndented = false, DefaultIgnoreCondition = JsonIgnoreCondition.Never, }; #endif } #endregion } }