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
Post a Comment