Skip to content

Instantly share code, notes, and snippets.

@visenger
Forked from takezoe/JSONSample.scala
Last active August 29, 2015 14:12
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 visenger/21e2090598e2546b6547 to your computer and use it in GitHub Desktop.
Save visenger/21e2090598e2546b6547 to your computer and use it in GitHub Desktop.
import scala.util.parsing.json._
val result = JSON.parseFull("""
{"name": "Naoki", "lang": ["Java", "Scala"]}
""")
result match {
case Some(e) => println(e) // => Map(name -> Naoki, lang -> List(Java, Scala))
case None => println("Failed.")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment