Created
March 13, 2020 08:44
-
-
Save vamjakuldip/1d7819dd84f53256f770491f71c74a3f to your computer and use it in GitHub Desktop.
this extension use for load json from file
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
fun Context.loadJSONFromAsserts(fileName: String): String { | |
return applicationContext.assets.open(fileName).bufferedReader().use { reader -> | |
reader.readText() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment