Skip to content

Commit 933472a

Browse files
author
Wes Billman
committed
Readme updates
1 parent 738ccca commit 933472a

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

README.md

+27-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
44
![SwiftPM Compatible](https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg)
55

6-
### JSONFeed
6+
# JSONFeed
77

8-
Swift parsing for [JSON Feed](https://jsonfeed.org/)
8+
Swift parsing for [JSON Feed](https://jsonfeed.org/) [Spec](https://jsonfeed.org/version/1)
99

1010
## Installation
1111

@@ -35,3 +35,28 @@ dependencies: [
3535

3636
### Manually
3737
Add all the files from `JSONFeed/JSONFeed` to your project
38+
39+
## Usage
40+
41+
> See [JSONFeedTests](https://github.com/wesbillman/JSONFeed/blob/master/JSONFeedTests/JSONFeedTests.swift) for detailed usage examples
42+
43+
#### Load a feed from a dictionary
44+
45+
```swift
46+
let dictionary = <some feed dictionary>
47+
let feed = try? JSONFeed(json: dictionary)
48+
```
49+
50+
#### Load a feed from data
51+
52+
```swift
53+
let data = <some feed data>
54+
let feed = try? JSONFeed(data: data)
55+
```
56+
57+
#### Load a feed from a json ut8f string
58+
59+
```swift
60+
let string = <some utf8 json string>
61+
let feed = try? JSONFeed(string: string)
62+
```

0 commit comments

Comments
 (0)