Created
May 6, 2020 21:24
-
-
Save hissain/fa33f84543563184ece4620afec98549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val list = listOf("String1", "String2" ... ) | |
val gson = Gson() | |
val jsonString = gson.toJson(list) | |
val sType = object : TypeToken<List<String>>() { }.type | |
val otherList = gson.fromJson<List<String>>(jsonString, sType) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment