Skip to content

Commit 4344238

Browse files
committed
updated README.md
1 parent 154b73a commit 4344238

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ you dont have to do anything :). `SHModelObject` automatically handles it. check
8888

8989
for example, following JSON
9090

91-
```
91+
```json
9292

9393
{
9494
"name" : "Shan Ul Haq",
@@ -103,7 +103,7 @@ for example, following JSON
103103
```
104104
will be automatically parsed into following object:
105105

106-
```
106+
```objective-c
107107
@interface Person : SHModelObject
108108

109109
@property(nonatomic, strong) NSString *name;
@@ -114,7 +114,7 @@ will be automatically parsed into following object:
114114
```
115115
where Image object is also a `SHModelObject`
116116

117-
```
117+
```objective-c
118118
@interface Image : SHModelObject
119119

120120
@property(nonatomic) int imageId;
@@ -130,7 +130,7 @@ similar to parsing `SHModelObject` instance variables, arrays can be handled too
130130

131131
for example, if you have following JSON
132132

133-
```
133+
```json
134134
{
135135
"aKey" : "aValue",
136136
"arrayOfModels" : [
@@ -154,7 +154,7 @@ for example, if you have following JSON
154154
```
155155
which translates to following objects.
156156

157-
```
157+
```objective-c
158158
@interface MyObject : SHModelObject
159159

160160
@property(nonatomic, strong) NSString *aKey;
@@ -175,7 +175,7 @@ which translates to following objects.
175175

176176
you can convert json like this:
177177

178-
```
178+
```objective-c
179179
// key is the variable name and value is the class name.
180180
NSDictionary *mappingDictionary = @{@"arrayOfModels" : "AModel"};
181181

0 commit comments

Comments
 (0)