#import "TextParser.h" #import "NullText.h" #import @implementation TextParser + (Text *)parse:(NSDictionary *)json key:(NSString *)key { return json[key] && ![json[key] isKindOfClass:[NSNull class]] ? [[Text alloc] initWithValue:[RCTConvert NSString:json[key]]] : [NullText new]; } @end