Skip to content

Commit 1d644da

Browse files
committed
fix: remove unnecessary method.
1 parent 9f2a0c8 commit 1d644da

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

templates/swift/Sources/Models/Model.swift.twig

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,5 @@ public class {{ definition | modelType(spec) | raw }} {
5858
{%~ endif %}
5959
)
6060
}
61-
62-
public static func from(json: String) -> {{ definition.name | caseUcfirst }}? {
63-
guard let data = json.data(using: .utf8) else {
64-
return nil
65-
}
66-
67-
do {
68-
if let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) as? [String: Any] {
69-
return {{ definition.name | caseUcfirst }}.from(map: jsonObject)
70-
} else {
71-
return nil
72-
}
73-
} catch {
74-
return nil
75-
}
76-
}
7761
}
7862
{% endif %}

0 commit comments

Comments
 (0)