From a293a8e049fea49b8c2b8262fb92a29f73d66989 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 2 Dec 2018 23:23:31 +0300 Subject: Drop YYModel --- Juick/Model/Entity.m | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Juick/Model/Entity.m') 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 -- cgit v1.2.3