DecodeContext 0.2.1

DecodeContext 0.2.1

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Aug 2016
SPMSupports SPM

Maintained by muukii, muukii.



DecodeContext

Example

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()

Requirements

Installation

DecodeContext is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "DecodeContext"

Author

muukii, [email protected]

License

DecodeContext is available under the MIT license. See the LICENSE file for more info.