internal static PacketCaptureListResult DeserializePacketCaptureListResult(JsonElement element) { IReadOnlyList <PacketCaptureResult> value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <PacketCaptureResult> array = new List <PacketCaptureResult>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(PacketCaptureResult.DeserializePacketCaptureResult(item)); } } value = array; continue; } } return(new PacketCaptureListResult(value)); }
internal static PacketCaptureListResult DeserializePacketCaptureListResult(JsonElement element) { Optional <IReadOnlyList <PacketCaptureResult> > value = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("value")) { List <PacketCaptureResult> array = new List <PacketCaptureResult>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(PacketCaptureResult.DeserializePacketCaptureResult(item)); } value = array; continue; } } return(new PacketCaptureListResult(Optional.ToList(value))); }