Convert ArrayList with Gson to String
问题 I have an ArrayList which contains ArrayLists , each ArrayList in the Root list contains one ArrayList of Integers and one of Strings . I am converting it with Gson to a String to save it with SharedPreferences. But when I am reconverting it, Gson gives me 2.131558489E9 instead of the original int 2131558489 . How can I fix this Problem? Best Regards. Here is how I convert the ArrayList: levelPattern is the ArrayList String levelPatternGson = new Gson().toJson(levelPattern); And this is how I