Skip to content

Commit 5fa34b4

Browse files
author
Josh Holtz
committed
Update README.md
1 parent e6fbe7b commit 5fa34b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A library for loading data from a [JSON API](http://jsonapi.org) datasource. Par
88

99
Version | Changes
1010
--- | ---
11-
**0.1.2** | `JSONAPIResource` IDs can either be numbers or strings (thanks [danylhebreux](https://github.com/danylhebreux)); `JSONAPIResource` subclass can have mappings defined to set JSON values into properties automatically - [see example](#example-mappings)
11+
**0.1.2** | `JSONAPIResource` IDs can either be numbers or strings (thanks [danylhebreux](https://github.com/danylhebreux)); `JSONAPIResource` subclass can have mappings defined to set JSON values into properties automatically - [see example](#resource-mappings)
1212
**0.1.1** | Fixed linked resources with links so they actually link to other linked resources
1313
**0.1.0** | Initial release
1414

@@ -38,9 +38,9 @@ it simply add the following line to your Podfile:
3838
### JSONAPIResource
3939
`JSONAPIResource` is an object that holds data for each resource in a JSON API document. This objects holds the "id", "href", and "links" as properties but also the rest of the object as an NSDictionary that can be accessed through `(id)objectForKey:(NSString*)key`. There is also a method for retrieving linked resources from the JSON API document by using `(id)linkedResourceForKey:(NSString*)key`.
4040

41+
#### Resource mappings
4142
`(NSDictionary*)mapKeysToProperties` can be overwritten to define a dictionary mapping of JSON keys to map into properties of a subclassed JSONAPIResource. Use a "links." prefix on the JSON key to map a linked JSONAPIResource model or array of JSONAPIResource models
4243

43-
#### Example mappings
4444
````objc
4545

4646
@implementation ASubclassedResource

0 commit comments

Comments
 (0)