Last active
May 6, 2022 17:19
-
-
Save akuholla/ea2f1c0ebdac760831d29549f1c344cb to your computer and use it in GitHub Desktop.
Gson
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
dependencies { | |
implementation 'com.google.code.gson:gson:2.9.0' | |
} | |
val countryArrayType: Type = object : TypeToken<ArrayList<Country?>?>() {}.type | |
val outputList: ArrayList<Country> = Gson().fromJson(countriesString, countryArrayType) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment