@@ -15,18 +15,18 @@ import Foundation
1515// MARK: basic type
1616public func <= < T, U> ( inout left: T , right: Mapper < U > ) {
1717 if right. mappingType == MappingType . fromJSON {
18- FromJSON < T > ( ) . baseType ( & left, object: right. currentValue)
18+ FromJSON < T > ( ) . basicType ( & left, object: right. currentValue)
1919 } else {
20- ToJSON ( ) . baseType ( left, key: right. currentKey!, dictionary: & right. JSONDictionary) ;
20+ ToJSON ( ) . basicType ( left, key: right. currentKey!, dictionary: & right. JSONDictionary) ;
2121 }
2222}
2323
2424// Optional basic type
2525public func <= < T, U> ( inout left: T ? , right: Mapper < U > ) {
2626 if right. mappingType == MappingType . fromJSON {
27- FromJSON < T > ( ) . optionalBaseType ( & left, object: right. currentValue)
27+ FromJSON < T > ( ) . optionalBasicType ( & left, object: right. currentValue)
2828 } else {
29- ToJSON ( ) . optionalBaseType ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
29+ ToJSON ( ) . optionalBasicType ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
3030 }
3131}
3232
@@ -35,11 +35,11 @@ public func <=<T, U, N>(inout left: T, right: (Mapper<U>, MapperTransform<T, N>)
3535 if right. 0 . mappingType == MappingType . fromJSON {
3636 var value : T ? = right. 1 . transformFromJSON ( right. 0 . currentValue)
3737 //println("FromJSON \(value)");
38- FromJSON < T > ( ) . baseType ( & left, object: value)
38+ FromJSON < T > ( ) . basicType ( & left, object: value)
3939 } else {
4040 var value : N ? = right. 1 . transformToJSON ( left)
4141 //println("\(left) toJSON \(value)")
42- ToJSON ( ) . optionalBaseType ( value, key: right. 0 . currentKey!, dictionary: & right. 0 . JSONDictionary)
42+ ToJSON ( ) . optionalBasicType ( value, key: right. 0 . currentKey!, dictionary: & right. 0 . JSONDictionary)
4343 }
4444}
4545
@@ -48,11 +48,11 @@ public func <=<T, U, N>(inout left: T?, right: (Mapper<U>, MapperTransform<T, N>
4848 if right. 0 . mappingType == MappingType . fromJSON {
4949 var value : T ? = right. 1 . transformFromJSON ( right. 0 . currentValue)
5050 //println("FromJSON \(value)");
51- FromJSON < T > ( ) . optionalBaseType ( & left, object: value)
51+ FromJSON < T > ( ) . optionalBasicType ( & left, object: value)
5252 } else {
5353 var value : N ? = right. 1 . transformToJSON ( left)
5454 //println("\(left) toJSON \(value)")
55- ToJSON ( ) . optionalBaseType ( value, key: right. 0 . currentKey!, dictionary: & right. 0 . JSONDictionary)
55+ ToJSON ( ) . optionalBasicType ( value, key: right. 0 . currentKey!, dictionary: & right. 0 . JSONDictionary)
5656 }
5757}
5858
@@ -95,18 +95,18 @@ public func <=<T: Mappable, U>(inout left: Dictionary<String, T>?, right: Mapper
9595// MARK: Dictionary <String, AnyObject>
9696public func <= < U> ( inout left: Dictionary < String , AnyObject > , right: Mapper < U > ) {
9797 if right. mappingType == MappingType . fromJSON {
98- FromJSON < AnyObject > ( ) . baseType ( & left, object: right. currentValue)
98+ FromJSON < AnyObject > ( ) . basicType ( & left, object: right. currentValue)
9999 } else {
100- ToJSON ( ) . baseDictionary ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
100+ ToJSON ( ) . basicDictionary ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
101101 }
102102}
103103
104104// Optional dictionary <String, AnyObject>
105105public func <= < U> ( inout left: Dictionary < String , AnyObject > ? , right: Mapper < U > ) {
106106 if right. mappingType == MappingType . fromJSON {
107- FromJSON < AnyObject > ( ) . optionalBaseType ( & left, object: right. currentValue)
107+ FromJSON < AnyObject > ( ) . optionalBasicType ( & left, object: right. currentValue)
108108 } else {
109- ToJSON ( ) . optionalBaseDictionary ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
109+ ToJSON ( ) . optionalBasicDictionary ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
110110 }
111111}
112112
@@ -131,17 +131,17 @@ public func <=<T: Mappable, U>(inout left: Array<T>?, right: Mapper<U>) {
131131// MARK: Array<AnyObject>
132132public func <= < U> ( inout left: Array < AnyObject > , right: Mapper < U > ) {
133133 if right. mappingType == MappingType . fromJSON {
134- FromJSON < AnyObject > ( ) . baseType ( & left, object: right. currentValue)
134+ FromJSON < AnyObject > ( ) . basicType ( & left, object: right. currentValue)
135135 } else {
136- ToJSON ( ) . baseArray ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
136+ ToJSON ( ) . basicArray ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
137137 }
138138}
139139
140140// Optional array of String type
141141public func <= < U> ( inout left: Array < AnyObject > ? , right: Mapper < U > ) {
142142 if right. mappingType == MappingType . fromJSON {
143- FromJSON < AnyObject > ( ) . optionalBaseType ( & left, object: right. currentValue)
143+ FromJSON < AnyObject > ( ) . optionalBasicType ( & left, object: right. currentValue)
144144 } else {
145- ToJSON ( ) . optionalBaseArray ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
145+ ToJSON ( ) . optionalBasicArray ( left, key: right. currentKey!, dictionary: & right. JSONDictionary)
146146 }
147147}
0 commit comments