SwiftJSONKit 0.1.0

SwiftJSONKit 0.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2017
SwiftSwift Version 3.0
SPMSupports SPM

Maintained by Patrick Montalto.



  • By
  • patrickmontalto

SwiftJSONKit

Overview

Usage

Take a plain old blog post struct:

struct Post {
    let title: String
    let createdAt: Date

And now add JSON deserialization easily:

import SwiftJSONKit

extension Post: JSONDeserializable {
    init(jsonRepresentation dictionary: JSONDictionary) throws {
        title = try decode(json, key: "title")
        createdAt = try decode(json, key: "created_at")
    }
}

Author

Patrick Montalto

License

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