refactored create(with:

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-05-10 14:50:27 -05:00
parent 42c203e773
commit d879b8c71f
2 changed files with 2 additions and 2 deletions

View File

@ -33,7 +33,7 @@ public extension TemplateProtocol {
guard let pageJSON = json else { return }
let delegateObject = (self as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject
let data = try JSONSerialization.data(withJSONObject: pageJSON)
let decoder = JSONDecoder.create(delegateObject: delegateObject)
let decoder = JSONDecoder.create(with: delegateObject)
templateModel = try decodeTemplate(using: decoder, from: data)
// Add additional required behaviors if applicable.

View File

@ -69,7 +69,7 @@ open class TopNotificationModel: Codable {
/// Decodes the top alert json to a model.
public static func decode(json: [AnyHashable: Any], delegateObject: MVMCoreUIDelegateObject?) throws -> Self {
let data = try JSONSerialization.data(withJSONObject: json)
let decoder = JSONDecoder.create(delegateObject: delegateObject)
let decoder = JSONDecoder.create(with: delegateObject)
return try decoder.decode(self, from: data)
}