summaryrefslogtreecommitdiff
path: root/Juick/Model/Entity.m
blob: cf23a2ac347b23d47388cfc6a8520a3ea0208b4f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
//
//  Entity.m
//  Juick
//
//  Created by Vitaly Takmazov on 12/11/2018.
//  Copyright © 2018 com.juick. All rights reserved.
//

#import "Entity.h"

@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