diff --git a/MVMCore/MVMCore/ActionHandling/ActionRestartModel.swift b/MVMCore/MVMCore/ActionHandling/ActionRestartModel.swift index 30888f9..e64a6d3 100644 --- a/MVMCore/MVMCore/ActionHandling/ActionRestartModel.swift +++ b/MVMCore/MVMCore/ActionHandling/ActionRestartModel.swift @@ -32,35 +32,4 @@ public struct ActionRestartModel: ActionModelProtocol { self.extraParameters = extraParameters self.analyticsData = analyticsData } - - //-------------------------------------------------- - // MARK: - Codable - //-------------------------------------------------- - private enum CodingKeys: String, CodingKey { - case actionType - case requestURL - case extraParameters - case analyticsData - case pageType - } - - public init(from decoder: Decoder) throws { - - let container = try decoder.container(keyedBy: CodingKeys.self) - self.actionType = try container.decode(String.self, forKey: .actionType) - self.requestURL = try container.decodeIfPresent(URL.self, forKey: .requestURL) - self.extraParameters = try container.decodeIfPresent(JSONValueDictionary.self, forKey: .extraParameters) - self.analyticsData = try container.decodeIfPresent(JSONValueDictionary.self, forKey: .analyticsData) - self.pageType = try container.decodeIfPresent(String.self, forKey: .pageType) - } - - public func encode(to encoder: Encoder) throws { - - var container = encoder.container(keyedBy: CodingKeys.self) - try container.encode(actionType, forKey: .actionType) - try container.encodeIfPresent(requestURL, forKey: .requestURL) - try container.encodeIfPresent(extraParameters, forKey: .extraParameters) - try container.encodeIfPresent(analyticsData, forKey: .analyticsData) - try container.encode(pageType, forKey: .pageType) - } }