Enhance JSON deserialization and file associations; refactor ProcessData classes for improved clarity and performance
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user