Skip to content

Instantly share code, notes, and snippets.

@wesen
Created September 29, 2013 14:00
Show Gist options
  • Select an option

  • Save wesen/6752786 to your computer and use it in GitHub Desktop.

Select an option

Save wesen/6752786 to your computer and use it in GitHub Desktop.
def getTweetData(user: String, json: String): List[Tweet] = {
// is list
val l = getList[Map[String, Any]](json)
for (map <- l) yield {
val text = map("text")
val retweets = map("retweets")
new Tweet(user, text.toString, retweets.toString.toDouble.toInt)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment