let jsonDictionary = try NSJSONSerialization.JSONObjectWithData(self.currentDeliveryAddress, options: []) as! NSDictionary
And
class CurrentDeliveryAddress :NSData
{
var streetName: String!
var areaName: String!
var buildingName: String!
var apartmentName: String!
var locationName: String!
var cityName: String!
var phoneNumber: String!
var location: Location!
var areaId: String!
class Location
{
var lat : Double!
var lng : Double!
init(lat:Double,lng :Double)
{
self.lat = lat
self.lng = lng
}
}
}
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -bytes only defined for abstract class. Define -[UrbanChef.CurrentDeliveryAddress bytes]!'
also tried with SwiftyJson
let swiftyJson = JSON(data: self.currentDeliveryAddress)
Now I'm using
And
also tried with SwiftyJson
Same error