Есть json
{"createdAt":643196835.51847398}
У меня есть codable, с init(from decoder: Decoder) throws
. Там у меня
self.createdAt = try container.decode(Date.self, forKey: .createdAt)
При декодинге ошибка:
typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [_JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "createdAt", intValue: nil)], debugDescription: "Expected to decode Array<Any> but found a number instead.", underlyingError: nil))