Swift AnyObject is not convertible to String/Int
问题 I want to parse a JSON to object, but I have no idea how to cast AnyObject to String or Int since I'm getting: 0x106bf1d07: leaq 0x33130(%rip), %rax ; "Swift dynamic cast failure" When using for example: self.id = reminderJSON["id"] as Int I have ResponseParser class and inside of it (responseReminders is an Array of AnyObjects, from AFNetworking responseObject): for reminder in responseReminders { let newReminder = Reminder(reminderJSON: reminder) ... } Then in Reminder class I'm