Latest 0.1.2
License MIT
Platforms ios 10.0, osx 10.12, watchos 3.0, tvos 10.0
Dependencies SimpleJSONKit
Frameworks Foundation

A JSON Feed wrapper written in pure Swift. For more information on JSON Feeds, see the JSON Feed specification.


Usage examples can be found in Tests/JSONFeedKitTests.playground. A quick summary here:

import JSONFeedKit

let requestURL = URL(string: "")!
let urlRequest = URLRequest(url: requestURL)
let session = URLSession(configuration: .default)
let task = session.dataTask(with: urlRequest, completionHandler: { (data, response, error) in
    let json = try! JSONSerialization.jsonObject(with: data!, options: [])
    let feed = try! Feed(jsonRepresentation: json as! [String : Any])

    // Use `feed` and its properties in this callback.


You may want to write a parser for extracting a JSON Feed URL from an HTML page. For that, I recomend using Ji.



You can use CocoaPods to install JSONFeedKit by adding it to your Podfile:

pod 'JSONFeedKit'


Create a Cartfile and add JSONFeedKit to it. Follow these instructions for using Carthage with an iOS project.

github "roonieone/JSONFeedKit"

Swift Package Manager

Create a new directory where you want your project to live. Use swift package init --type executable to create set up your package. In your new Package.swift add the following:

import PackageDescription

let package = Package(
   name: "Project Name",
   dependencies: [
      .Package(url: "", "0.1.2")

Then use swift package fetch to download the JSON dependency and swift package generate-xcodeproj to create an Xcode Project. For more information on how to use Swift Package Manager with iOS, see this gist.

Latest podspec

    "name": "JSONFeedKit",
    "version": "0.1.2",
    "summary": "A JSON Feed wrapper written in pure Swift.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Mark Malstrom": "[email protected]"
    "social_media_url": "",
    "platforms": {
        "ios": "10.0",
        "osx": "10.12",
        "watchos": "3.0",
        "tvos": "10.0"
    "source": {
        "git": "",
        "tag": "0.1.2"
    "frameworks": "Foundation",
    "source_files": "Sources",
    "dependencies": {
        "SimpleJSONKit": []
    "pushed_with_swift_version": "3.1"

Pin It on Pinterest

Share This