Fix crash on Windows (Reflection-based serialization has been disabled for this application)

This commit is contained in:
2025-07-09 15:25:32 +02:00
parent 1e5c7d259f
commit 584ffa36cb

View File

@@ -128,7 +128,12 @@ public class TimesheetService
string jsonResponse = await response.Content.ReadAsStringAsync();
JsonSerializerOptions options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
JsonSerializerOptions options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true,
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true
};
JsonObject? data = JsonSerializer.Deserialize<JsonObject>(jsonResponse, options);
foreach (KeyValuePair<string, JsonNode> item in data)