File tree 1 file changed +27
-2
lines changed
1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change 3
3
[ ![ Carthage compatible] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat )] ( https://github.com/Carthage/Carthage )
4
4
![ SwiftPM Compatible] ( https://img.shields.io/badge/SwiftPM-Compatible-brightgreen.svg )
5
5
6
- ### JSONFeed
6
+ # JSONFeed
7
7
8
- Swift parsing for [ JSON Feed] ( https://jsonfeed.org/ )
8
+ Swift parsing for [ JSON Feed] ( https://jsonfeed.org/ ) [ Spec ] ( https://jsonfeed.org/version/1 )
9
9
10
10
## Installation
11
11
@@ -35,3 +35,28 @@ dependencies: [
35
35
36
36
### Manually
37
37
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
+ ```
You can’t perform that action at this time.
0 commit comments