Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)' :   Getting an error NSInvalidArgumentException', reason: 'Invalid type in JSON write . I hope this error when i post image data string in Request.Please help 
   

     let imageData : NSData!
         imageData = UIImagePNGRepresentation(first.image!)!
            let base64String = imageData.base64EncodedDataWithOptions(NSDataBase64EncodingOptions.Encoding64CharacterLineLength)
    
    
      requestObject["pimage1"] = base64String
    
    
    let jsonData = try! NSJSONSerialization.dataWithJSONObject(params, options: .PrettyPrinted)

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSConcreteData)'