Created
March 6, 2014 02:48
-
-
Save brentsowers1/9381300 to your computer and use it in GitHub Desktop.
Parsing Github data in to case classes
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
// 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