Skip to content

Instantly share code, notes, and snippets.

@takezoe
Created December 30, 2011 15:02
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • 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.")
}
@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