I\'m using NSJSONSerialization
as so:
let twData: AnyObject? = NSJSONSerialization.JSONObjectWithData(responseData, options: NSJSONReadingOption
let twData: Any = NSJSONSerialization.JSONObjectWithData(responseData, options: NSJSONReadingOptions.MutableLeaves, error: &dataError)
Do not use AnyObject
. Use Any
instead of AnyObject
. It will work fine. AnyObject
is for all reference type and Array is a value type. That's why this comes. Change it to Any
.