removed unused code

This commit is contained in:
Suresh, Kamlesh 2021-01-20 12:18:11 -05:00
parent dcd2dc4fd8
commit 8ed40b8a03

View File

@ -66,22 +66,6 @@ public struct ModelRegistry {
return AnyCodingKey(category.codingKey)
}
public static func getModelFor<T>(json: [String: Any], type: T.Type) throws -> ModelProtocol? {
guard let categoryKey = ModelRegistry.getCategory(for: type)?.codingKey else {
throw ModelRegistry.Error.other(message: "coding key missing")
}
guard let parameterType = json.optionalStringForKey(categoryKey) else {
throw ModelRegistry.Error.other(message: "type missing")
}
guard let type = ModelRegistry.getType(for: parameterType, with: type) else {
throw ModelRegistry.Error.decoderErrorModelNotMapped()
}
return try type.decode(jsonDict: json)
}
}
extension KeyedDecodingContainer where Key: CodingKey {