Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Example of scala.util.parsing.json

View JSONSample.scala
1 2 3 4 5 6 7 8 9 10
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.")
}

Thanks TakeZoe .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.