public
Last active

Example of scala.util.parsing.json

  • Download Gist
JSONSample.scala
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 .

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.