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 - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -