//Object to JSONStringGsongson=newGson();StringmyObjectJsonStr=gson.toJson(myObject);// List of Objects to JsonStringStringmyObjectJsonStr=gson.toJson(myList);//JSONString to ObjectGsongson=newGson();MyClassmyObject=gson.fromJson(myJSONObject,MyClass.class);//JSONString to List of ObjectsTypetype=newTypeToken<ArrayList<MyClass>>(){}.getType()ArrayList<MyClass>myObject=gson.fromJson(myObjectJsonStr,type);