We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 19d499c + 73cb592 commit 8b69860Copy full SHA for 8b69860
Sources/Mappable.swift
@@ -46,7 +46,7 @@ public protocol StaticMappable: BaseMappable {
46
static func objectForMapping(map: Map) -> BaseMappable?
47
}
48
49
-public extension BaseMappable {
+public extension Mappable {
50
51
/// Initializes object from a JSON String
52
init?(JSONString: String, context: MapContext? = nil) {
@@ -65,12 +65,15 @@ public extension BaseMappable {
65
return nil
66
67
68
-
+}
69
+
70
+public extension BaseMappable {
71
72
/// Returns the JSON Dictionary for the object
73
func toJSON() -> [String: Any] {
74
return Mapper().toJSON(self)
75
76
77
/// Returns the JSON String for the object
78
func toJSONString(prettyPrint: Bool = false) -> String? {
79
return Mapper().toJSONString(self, prettyPrint: prettyPrint)
0 commit comments