Last active
August 28, 2017 19:09
-
-
Save vhart/9442d53739506670af52c842a268ca1b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SomeDeserializer<T, D: JsonDeserializer>: JsonDeserializer { | |
| private let deserializer: D | |
| init<D: JsonDeserializer>(deserializer: D) where D.Response == T { | |
| self.deserializer = deserializer | |
| } | |
| func parse(json: [String : Any]) -> T { | |
| return deserializer.parse(json: json) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment