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