How to parse Local JSON (from Asset folder) for building Bible App in android -


i planning build app bible., decided use local json parse data. please share ideas data local json.

you can use gson ease process of converting json object java object , can access individual attributes of java class using getters , setters. here small example:

gson gson = new gson();      try {          bufferedreader br = new bufferedreader(             new filereader("c:\\file.json"));          //convert json string object         dataobject obj = gson.fromjson(br, dataobject.class);          system.out.println(obj);      } catch (ioexception e) {         e.printstacktrace();     } 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -