MET08DDUPSP1TBI - v2.43.0 - SPC and APC Bug Fix

This commit is contained in:
2022-06-08 13:54:31 -07:00
parent 7d61122159
commit c3e5076525
16 changed files with 148 additions and 176 deletions

View File

@ -902,16 +902,20 @@ public class ProcessData : IProcessData
fileInfoCollection.Add(new FileInfo(logistics.ReportFullPath));
}
#nullable enable
internal static List<Description> GetDescriptions(JsonElement[] jsonElements)
{
List<Description> results = new();
Description description;
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);
if (description is null)
continue;
results.Add(description);
}
return results;