Skip to content

Instantly share code, notes, and snippets.

@lucassales2
Created August 14, 2019 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucassales2/4a52746a5bd44aee92e07804fc7fbe73 to your computer and use it in GitHub Desktop.
Save lucassales2/4a52746a5bd44aee92e07804fc7fbe73 to your computer and use it in GitHub Desktop.
fun Language(jsonObject: JSONObject) = Language(
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