     for (_, key) in sortedKeys.enumerated() {
       
       if let value = lowerCaseParams[key] {
-        encodedParamerers.add(encode(key, value: value))
+        let encodedParamerer = encode(key, value: value)
+        
+        if !encodedParamerer.isEmpty {
+          encodedParamerers.add(encodedParamerer)
+        }
       } else {
-        encodedParamerers.add(encode(key, value: ""))
+        let encodedParamerer = encode(key, value: "")
+        
+        if !encodedParamerer.isEmpty {
+          encodedParamerers.add(encodedParamerer)
+        }
       }
     }
     
     return encodedParamerers.componentsJoined(by: "&")
   }
   
-  open func encode(_ key : String, value : Any?) -> String {
+  func encode(_ key : String, value : Any?) -> String {
     
     if let currentValue = value as? [String : Any] {
       if currentValue.count == 0 {
-        return ""
+        return String(format: "%@=%@", key.af_urlEncodedString(), "")
       }
       
-      do {
-        let json = try JSONSerialization.data(withJSONObject: currentValue, options: [])
-        
-        if let jsonString = String(data: json, encoding: String.Encoding.utf8) {
-          
-          return String(format: "%@=%@", key.af_urlEncodedString(), jsonString.af_urlEncodedString())
-        }
-        
-      }
-      catch _ as NSError {
+      if let json = try? JSONSerialization.data(withJSONObject: currentValue, options: []), let jsonString = String(data: json, encoding: String.Encoding.utf8) {
+        return String(format: "%@=%@", key.af_urlEncodedString(), jsonString.af_urlEncodedString())
       }
     } else if let currentValue = value as? Array<Any> {
       if currentValue.count == 0 {
-        return ""
+        return String(format: "%@=%@", key.af_urlEncodedString(), "")
       }
       
-      
-      do {
-        let json = try JSONSerialization.data(withJSONObject: currentValue, options: [])
-        
-        if let jsonString = String(data: json, encoding: String.Encoding.utf8) {
-          return String(format: "%@=%@", key.af_urlEncodedString(), jsonString.af_urlEncodedString())
-        }
-        
-      }
-      catch _ as NSError {
+      if let json = try? JSONSerialization.data(withJSONObject: currentValue, options: []), let jsonString = String(data: json, encoding: String.Encoding.utf8) {
+        return String(format: "%@=%@", key.af_urlEncodedString(), jsonString.af_urlEncodedString())
       }
     } else if let currentValue = value as? String {
       return String(format: "%@=%@", key.af_urlEncodedString(), currentValue.af_urlEncodedString())

    let signatureParam = components.joined(separator: "\n")
    let signature = signatureParam.sha256HMAC(withKey: clientSecret)
    
    var signedParams = [String : Any]()
    
    signedParams["auth_version"] = self.clientVersion
    signedParams["auth_client_id"] = self.clientId
    signedParams["auth_timestamp"] = timestamp
    signedParams["auth_signature"] = signature
    
    return signedParams
  }
  
  open func parameterString(_ params : [String : Any?]) -> String {


open class AFSignedHTTPRequestSerializer : AFJSONRequestSerializer {
  
  open var clientVersion = "4"
  open var clientId: String
  open var clientSecret: String
  
