From d46093887cfee6a4a328b1e9f466fb0c64b5d896 Mon Sep 17 00:00:00 2001 From: Krishna Kishore Bandaru Date: Tue, 5 Mar 2024 11:31:31 +0530 Subject: [PATCH] updated to shouldRemoveDefaultEncoding --- MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h | 1 - MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m | 1 - MVMCore/MVMCore/Models/JSON/JSONHelper.swift | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h index f4dccbd..3a47d8b 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.h @@ -58,7 +58,6 @@ extern NSString * const KeyCallNumber; extern NSString * const KeyPhoneNumber; extern NSString * const KeyPresentationStyle; extern NSString * const KeyExtraParameters; -extern NSString * const KeyExtraEncodedParameters; extern NSString * const KeyContextRoot; extern NSString * const KeyType; diff --git a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m index 684b8ca..3ad5e93 100644 --- a/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m +++ b/MVMCore/MVMCore/Constants/MVMCoreJSONConstants.m @@ -58,7 +58,6 @@ NSString * const KeyCallNumber = @"callNumber"; NSString * const KeyPhoneNumber = @"phoneNumber"; NSString * const KeyPresentationStyle = @"presentationStyle"; NSString * const KeyExtraParameters = @"extraParameters"; -NSString * const KeyExtraEncodedParameters = @"extraEncodedParameters"; NSString * const KeyContextRoot = @"appContext"; NSString * const KeyType = @"type"; diff --git a/MVMCore/MVMCore/Models/JSON/JSONHelper.swift b/MVMCore/MVMCore/Models/JSON/JSONHelper.swift index 819eee4..6b4deef 100644 --- a/MVMCore/MVMCore/Models/JSON/JSONHelper.swift +++ b/MVMCore/MVMCore/Models/JSON/JSONHelper.swift @@ -53,7 +53,7 @@ extension JSONDictionary { return string } - public func toUrlQueryItems(shouldRemoveEncoding: Bool = true) throws -> [URLQueryItem] { + public func toUrlQueryItems(shouldRemoveDefaultEncoding: Bool = false) throws -> [URLQueryItem] { var queryItems: [URLQueryItem] = [] for (key, value) in self { var valueString: String @@ -63,7 +63,7 @@ extension JSONDictionary { valueString = try value.toJSONString() } else { valueString = String(describing: value.base) - if shouldRemoveEncoding { + if shouldRemoveDefaultEncoding { guard let encodedValue = valueString.removingPercentEncoding else { throw JSONError.error(message:"query item failed: \(key) value \(value.base)") } valueString = encodedValue }