You get null values ββfor some of your keys. They are mapped to NSNull using NSJSONSerialization.
You need to do a few things
Change all variables ( url
, contactNo
, etc.) to options:
var url:String? var contactNo:String?
Change all your assignments to use ?
instead !
:
url = noNulls[URL] as? String contactNo = noNulls[CONTACT_NO] as? String
Finally, make your code a nil descriptor for all of your variables. (But do not use !
This path leads to failures.)
source share