Skip to content

Instantly share code, notes, and snippets.

@takezoe
Created December 30, 2011 15:02
Show Gist options
  • Save takezoe/1540223 to your computer and use it in GitHub Desktop.
Save takezoe/1540223 to your computer and use it in GitHub Desktop.
Example of scala.util.parsing.json
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.")
}
@mohndoss
Copy link

If you can please help me to return above value as map

@dmigo
Copy link

dmigo commented Apr 30, 2020

It seems to be deprecated. Do you know if there is a new example somewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment