MET08THFTIRSTRATUS - v2.43.0 - SPC and APC Bug Fix

This commit is contained in:
2022-06-09 12:13:30 -07:00
parent ffce7ecf75
commit 081513e457
15 changed files with 117 additions and 171 deletions

View File

@ -461,16 +461,20 @@ public partial class ProcessData : IProcessData
_Details.AddRange(details);
}
#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;