hurl.exe when using Effort

Enhance JSON handling and file associations in settings; refactor ProcessData classes for improved serialization and error handling
This commit is contained in:
2025-10-13 10:23:16 -07:00
parent 68c3a8b5f3
commit 2e08fc51d4
11 changed files with 126 additions and 44 deletions

View File

@ -615,12 +615,11 @@ public class ProcessData : IProcessData
{
List<Description> results = new();
Description? description;
JsonSerializerOptions jsonSerializerOptions = new() { NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString };
foreach (JsonElement jsonElement in jsonElements)
{
if (jsonElement.ValueKind != JsonValueKind.Object)
throw new Exception();
description = JsonSerializer.Deserialize<Description>(jsonElement.ToString(), jsonSerializerOptions);
description = JsonSerializer.Deserialize(jsonElement.ToString(), SharedDescriptionSourceGenerationContext.Default.Description);
if (description is null)
continue;
results.Add(description);