TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2016 |
SPMSupports SPM | ✗ |
Define Context
extension String {
static let decodeContext = DecodeContext<SwiftyJSON.JSON, String> { json in
return json.string
}
}
Decode
let id = try Decoder(String.decodeContext, json["id"]).get()
DecodeContext is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "DecodeContext"
muukii, [email protected]
DecodeContext is available under the MIT license. See the LICENSE file for more info.