         return (self as NSString).integerValue
     }
     
-    public func parseJSON(_ block: (AnyObject,NSError?)->Void)->Void{
+    public func parseJSON(_ block:jsonHandler)->Void{
         let data = self.data(using: String.Encoding.utf8)
-        
         data?.parseJSON(block)
     }
     

}
public typealias progressHandler = ((countOfBytesReceived: Int64 ,countOfBytesExpectedToReceive: Int64) -> Void)
public typealias completionHandler = ((data:Data?, response:URLResponse?, error:NSError?) -> Swift.Void)
public typealias jsonHandler = (anyObject:AnyObject)->Void
public typealias imageHandler = (image:UIImage?,error:NSError?)->Void
public class WTURLSessionTask:NSObject,URLSessionDataDelegate{
    //网址凭据

            if let _ = self.jsonHandler{
                self.data.parseJSON({ (object, error) in
                    OperationQueue.main({
                        self.jsonHandler?(anyObject:object,error:error)
                    })
                })
                
