Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created March 6, 2014 02:48
Show Gist options
  • Save brentsowers1/9381300 to your computer and use it in GitHub Desktop.
Save brentsowers1/9381300 to your computer and use it in GitHub Desktop.
Parsing Github data in to case classes
// Don't or modify remove this, it's needed by the Lift JSON library
implicit val formats = net.liftweb.json.DefaultFormats
val rspJson = parse(rspStr)
// Github response is an array of objects, this will get that array
// as a List
val rspList = rspJVal.children
val rspRepos = for (repoJObj <- rspList) yield repoJObj.extract[Repo]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment