-(void) viewdidload
{
[Super Viewdidload];
Additional setup after loading the view, typically from a nib.
Self.navigationItem.leftBarButtonItem = Self.editbuttonitem;
Self.detailviewcontroller = (Detailviewcontroller *) [[Self.splitViewController.viewControllers Lastobject] Topviewcontroller];
[[Nsnotificationcenter Defaultcenter] Addobserver:self
Selector: @selector (reloadview:)
name:@ "Reloadviewnotification"
Object:nil];
Notesnextivejsonparser *parser = [Notesnextivejsonparser new];
Start parsing
[Parser start];
nsstring* path = [[NSBundle mainbundle] pathforresource:@ "Notes" oftype:@ "json"];
NSData *jsondata = [[NSData alloc] initwithcontentsoffile:path];
Nserror *error;
ID jsonobj = [nsjsonserialization jsonobjectwithdata:jsondata
Options:nsjsonreadingmutablecontainers error:&error];
if (!jsonobj | | | error) {
NSLog (@ "JSON decoding failed");
}
Self.listdata = [Jsonobj objectforkey:@ "Record"];
}
IOS parsing JSON