You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-21Lines changed: 18 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,25 @@ it simply add the following line to your Podfile:
46
46
#### Formatter
47
47
`JSONAPIResourceFormatter` is used to format values before getting mapped from `mapKeysToProperties`.
48
48
49
+
Below is an example to register a "Date" function to format a date in a NSString object to an NSDate object before its mapped to the JSONAPIResource instance.
if (![dateFormatter getObjectValue:&date forString:jsonValue range:nil error:&error]) {
61
+
NSLog(@"Date '%@' could not be parsed: %@", jsonValue, error);
62
+
}
63
+
64
+
return date;
65
+
}];
66
+
67
+
````
50
68
51
69
##### Usage
52
70
@@ -79,27 +97,6 @@ it simply add the following line to your Podfile:
79
97
80
98
````
81
99
82
-
##### Using `JSONAPIResourceFormatter` to format values
83
-
Below is an example to register a "Date" function to format a date in a NSString object to an NSDate object before its mapped to the JSONAPIResource instance.
0 commit comments