Created
December 30, 2011 15:02
-
-
Save takezoe/1540223 to your computer and use it in GitHub Desktop.
Example of scala.util.parsing.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
It seems to be deprecated. Do you know if there is a new example somewhere?