Last active
August 14, 2019 08:09
-
-
Save lucassales2/abd86dc4bdaffc0bfa144237b156dd22 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
data class Language( | |
val id: Int, | |
val name: String, | |
val locale: Locale, | |
val direction: String, | |
val isDefault: Boolean, | |
val isBestFit: Boolean | |
) { | |
constructor(jsonObject: JSONObject) : this( | |
id = jsonObject.getInt("id"), | |
name = jsonObject.getString("name"), | |
locale = Locale(jsonObject.getString("locale")), | |
direction = jsonObject.getString("direction"), | |
isDefault = jsonObject.getBoolean("is_default"), | |
isBestFit = jsonObject.getBoolean("is_best_fit") | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment