

#import "SocializeApplicationJSONFormatter.h"


@implementation SocializeApplicationJSONFormatter

-(void)doToObject:(id<SocializeObject>) toObject fromDictionary:(NSDictionary *)JSONDictionary
{
    id<SocializeApplication> toApplication = (id<SocializeApplication>)toObject;
    
    [toApplication setObjectID: [[JSONDictionary valueForKey:@"id"]intValue]];
    [toApplication setName:[JSONDictionary valueForKey:@"name"]];   
}

-(void)doToDictionary:(NSMutableDictionary *)JSONFormatDictionary fromObject:(id<SocializeObject>) fromObject
{
    id<SocializeApplication> fromApplication = (id<SocializeApplication>)fromObject;
    
    [JSONFormatDictionary setObject:[NSNumber numberWithInt:fromApplication.objectID] forKey:@"id"];
    [JSONFormatDictionary setObject:fromApplication.name forKey:@"name"];
}

@end
