I am struggling to find a good example on how to read and write data in my android app using GSON. Could someone please show me or point me to a good example? I am using thi
Maybe in more recent version, but toJson accepts writer that directly writes to file.
ex.:
Vector v = new Vector(10.0f, 20.0f); Gson gson = new GsonBuilder().create(); Writer writerJ = new FileWriter("keep.json"); gson.toJson(v,writerJ);