File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ public protocol StaticMappable: BaseMappable {
4646 static func objectForMapping( map: Map ) -> BaseMappable ?
4747}
4848
49- public extension BaseMappable {
49+ public extension Mappable {
5050
5151 /// Initializes object from a JSON String
5252 init ? ( JSONString: String , context: MapContext ? = nil ) {
@@ -65,12 +65,15 @@ public extension BaseMappable {
6565 return nil
6666 }
6767 }
68-
68+ }
69+
70+ public extension BaseMappable {
71+
6972 /// Returns the JSON Dictionary for the object
7073 func toJSON( ) -> [ String : Any ] {
7174 return Mapper ( ) . toJSON ( self )
7275 }
73-
76+
7477 /// Returns the JSON String for the object
7578 func toJSONString( prettyPrint: Bool = false ) -> String ? {
7679 return Mapper ( ) . toJSONString ( self , prettyPrint: prettyPrint)
You can’t perform that action at this time.
0 commit comments