ios - Parse data from json local file using AFNetworking -


is possible parse data local json file ,using afnetworking instead of sbjson?

you don't need use afnetworking local json. won't have network related advantage in local files.

nsstring *filepath = [[nsbundle mainbundle] pathforresource:jsonfilename oftype:@"json"]; nsdata *jsondata = [nsdata datawithcontentsoffile:filepath options:nsdatareadingmappedifsafe error:nil]; nsdictionary *jsonobject = [nsjsonserialization jsonobjectwithdata:jsondata options:nsjsonreadingmutablecontainers error:nil]; 

now use jsondictionary per need.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -