diff --git a/AutoTask.Psa.Api/AutoTask.Psa.Api.csproj b/AutoTask.Psa.Api/AutoTask.Psa.Api.csproj
index c68ffd9..cd2cc86 100644
--- a/AutoTask.Psa.Api/AutoTask.Psa.Api.csproj
+++ b/AutoTask.Psa.Api/AutoTask.Psa.Api.csproj
@@ -41,7 +41,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/AutoTask.Psa.Api/AutoTaskClient.cs b/AutoTask.Psa.Api/AutoTaskClient.cs
index 0609062..bb31221 100644
--- a/AutoTask.Psa.Api/AutoTaskClient.cs
+++ b/AutoTask.Psa.Api/AutoTaskClient.cs
@@ -1,5 +1,7 @@
using Newtonsoft.Json.Linq;
using System.Text;
+using System.Text.Json;
+using System.Text.Json.Serialization;
namespace AutoTask.Psa.Api;
@@ -27,18 +29,13 @@ public AutoTaskClient(HttpClient client)
_httpClient = client;
_refitSettings = new RefitSettings
{
- //ContentSerializer = new NewtonsoftJsonContentSerializer(
- // new JsonSerializerSettings
- // {
- // // By default nulls should not be rendered out, this will allow the receiving API to apply any defaults.
- // // Use [JsonProperty(NullValueHandling = NullValueHandling.Include)] to send
- // // nulls for specific properties, e.g. disassociating port schedule ids from a port
- // NullValueHandling = NullValueHandling.Ignore,
- // #if DEBUG
- // MissingMemberHandling = MissingMemberHandling.Error,
- // #endif
- // Converters = new List { new StringEnumConverter() }
- // })
+ ContentSerializer = new SystemTextJsonContentSerializer(
+ new JsonSerializerOptions
+ {
+ DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull,
+ PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
+ WriteIndented = true,
+ })
};
ActionTypes = RefitFor(ActionTypes!);
AdditionalInvoiceFieldValues = RefitFor(AdditionalInvoiceFieldValues!);