diff options
Diffstat (limited to 'Juick/Model/Entity.m')
-rw-r--r-- | Juick/Model/Entity.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Juick/Model/Entity.m b/Juick/Model/Entity.m index ac53a1f..cf23a2a 100644 --- a/Juick/Model/Entity.m +++ b/Juick/Model/Entity.m @@ -10,4 +10,14 @@ @implementation Entity ++(Entity *) fromJSON:(NSDictionary *)jsonData { + Entity *entity = [Entity new]; + entity.start = jsonData[@"start"]; + entity.end = jsonData[@"end"]; + entity.type = jsonData[@"type"]; + entity.text = jsonData[@"text"]; + entity.link = jsonData[@"url"]; + return entity; +} + @end |