Skip to content

Commit a772c85

Browse files
- updated a function definition which I missed in an earlier commit
1 parent f6d6738 commit a772c85

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ObjectMapper/Core/FromJSON.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ class FromJSON<CollectionType> {
7474

7575
func object<N: MapperProtocol>(inout field: N, object: AnyObject?) {
7676
if let value = object as? [String : AnyObject] {
77-
field = Mapper().map(value, to: N.self)
77+
field = Mapper().map(value, toType: N.self)
7878
}
7979
}
8080

8181
func object<N: MapperProtocol>(inout field: N?, object: AnyObject?) {
8282
if let value = object as? [String : AnyObject] {
83-
field = Mapper().map(value, to: N.self)
83+
field = Mapper().map(value, toType: N.self)
8484
}
8585
}
8686

@@ -111,7 +111,7 @@ class FromJSON<CollectionType> {
111111
if let array = object as [AnyObject]? {
112112
for object in array {
113113
let objectJSON = object as [String : AnyObject]
114-
var parsedObj = mapper.map(objectJSON, to: N.self)
114+
var parsedObj = mapper.map(objectJSON, toType: N.self)
115115
parsedObjects.append(parsedObj)
116116
}
117117
}
@@ -148,7 +148,7 @@ class FromJSON<CollectionType> {
148148
if let dictionary = object as Dictionary<String, AnyObject>? {
149149
for (key, object) in dictionary {
150150
let objectJSON = object as [String : AnyObject]
151-
var parsedObj = mapper.map(objectJSON, to: N.self)
151+
var parsedObj = mapper.map(objectJSON, toType: N.self)
152152
parsedObjectsDictionary[key] = parsedObj
153153
}
154154
}

ObjectMapper/Core/Mapper.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ public class Mapper {
5959
public func map<N: MapperProtocol>(string JSONString: String, toType type: N.Type) -> N! {
6060
var json = parseJSONDictionary(JSONString)
6161
if let json = json {
62-
return map(json, to: type)
62+
return map(json, toType: type)
6363
}
6464
return nil
6565
}
6666

6767
// maps a JSON dictionary to an object that conforms to MapperProtocol
68-
public func map<N: MapperProtocol>(JSON: [String : AnyObject], to type: N.Type) -> N! {
68+
public func map<N: MapperProtocol>(JSON: [String : AnyObject], toType type: N.Type) -> N! {
6969
mappingType = .fromJSON
7070

7171
self.JSONDictionary = JSON

0 commit comments

Comments
 (0)