I've been trying to use JSONmodel to try and get data from my server to my ios device. I've set up my classes properly but for some reason it keeps coming back null after calling the url.
feed = [[Feeds alloc] initFromURLWithString:@"http://http://www.cs4768project.net76.net/untitled.php?action=getShops"
completion:^(JSONModel *model, JSONModelError *err) {
NSLog(@"reached");
//json fetched
NSLog(@"shops: %@", feed.shops);
Here is the model that holds the feeds
@interface Feeds : JSONModel
@property(strong,nonatomic) NSArray* shops;
@end
along with my coffee shop class
@interface CoffeeShop : JSONModel
@property(strong, nonatomic) NSString* name;
@property(nonatomic) CLLocationDegrees latitude;
@property(nonatomic) CLLocationDegrees longtitude;
@end
the json output:
{"name":"Starbs","latitude":"45","longtitude":"-52"}
i've been trying to find a solution for a while and have come up with nothing and im stumped on why this isnt working. Any help would be awesome.