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

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -