Decoder) throws { let container = try decoder.singleValueContainer() if let value = try? container.decode(Media.self) { self.value = value } else if let value = try? container.decode([Media].self) { self.value = value } else { preconditionFailure() } } }