{"id":16092783,"url":"https://github.com/wesbillman/jsonfeed","last_synced_at":"2025-03-18T06:31:03.507Z","repository":{"id":66773712,"uuid":"91817538","full_name":"wesbillman/JSONFeed","owner":"wesbillman","description":"JSONFeed parser for swift","archived":false,"fork":false,"pushed_at":"2020-08-12T07:08:20.000Z","size":31,"stargazers_count":27,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T07:51:33.531Z","etag":null,"topics":["json","jsonfeed","swift"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wesbillman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-19T15:03:26.000Z","updated_at":"2020-08-19T00:35:59.000Z","dependencies_parsed_at":"2023-04-30T01:46:17.554Z","dependency_job_id":null,"html_url":"https://github.com/wesbillman/JSONFeed","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesbillman%2FJSONFeed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesbillman%2FJSONFeed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesbillman%2FJSONFeed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesbillman%2FJSONFeed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wesbillman","download_url":"https://codeload.github.com/wesbillman/JSONFeed/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910373,"owners_count":20367537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json","jsonfeed","swift"],"created_at":"2024-10-09T16:10:21.388Z","updated_at":"2025-03-18T06:31:03.495Z","avatar_url":"https://github.com/wesbillman.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/wesbillman/JSONFeed.svg?branch=master)](https://travis-ci.org/wesbillman/JSONFeed)\n[![Codecov](https://img.shields.io/codecov/c/github/wesbillman/JSONFeed.svg)](https://codecov.io/gh/wesbillman/JSONFeed)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)\n\n# JSONFeed\n\nSwift parsing for [JSON Feed](https://jsonfeed.org/) [Spec](https://jsonfeed.org/version/1)\n\n## Installation\n\n### Carthage\n\nYou can install [Carthage](https://github.com/Carthage/Carthage) with [Homebrew](http://brew.sh/) using the following command:\n\n```bash\nbrew update\nbrew install carthage\n```\nTo integrate JSONFeed into your Xcode project using Carthage, specify it in your `Cartfile` where `\"x.x.x\"` is the current release:\n\n```ogdl\ngithub \"wesbillman/JSONFeed\" \"x.x.x\"\n```\n\n### Swift Package Manager\n\nTo install using [Swift Package Manager](https://swift.org/package-manager/) have your Swift package set up, and add JSONFeed as a dependency to your `Package.swift`.\n\n```swift\ndependencies: [\n    .Package(url: \"https://github.com/wesbillman/JSONFeed.git\", majorVersion: 0)\n]\n```\n\n### Manually\nAdd all the files from `JSONFeed/JSONFeed` to your project\n\n## Usage\n\n\u003e See [JSONFeedTests](https://github.com/wesbillman/JSONFeed/blob/master/JSONFeedTests/JSONFeedTests.swift) for detailed usage examples\n\n#### Load a feed from a dictionary\n\n```swift\nlet dictionary = \u003csome feed dictionary\u003e\nlet feed = try? JSONFeed(json: dictionary)\n```\n\n#### Load a feed from data\n\n```swift\nlet data = \u003csome feed data\u003e\nlet feed = try? JSONFeed(data: data)\n```\n\n#### Load a feed from a json ut8f string\n\n```swift\nlet string = \u003csome utf8 json string\u003e\nlet feed = try? JSONFeed(string: string)\n```\n### Reading from a feed via URLSession\n\nUsing default configuration and URLSession\n```swift\nlet reader = JSONFeedReader()\nreader.read(string: \"https://jsonfeed.org/feed.json\") { (feed, error) in\n    if let error = error {\n        //bad things happened\n    }\n\n    if let feed = feed {\n        //good things happened\n    }\n}\n```\n\nUsing custom implemenation of URLSession (example: for unit testing)\n```swift\nlet reader = JSONFeedReader(session: SomeCustomURLSession)\nreader.read(string: \"https://jsonfeed.org/feed.json\") { (feed, error) in\n    if let error = error {\n        //bad things happened\n    }\n\n    if let feed = feed {\n        //good things happened\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesbillman%2Fjsonfeed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesbillman%2Fjsonfeed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesbillman%2Fjsonfeed/lists"}