-
-
Save goungoun/02e446e36d1ef577ca14c5f9707fc86d to your computer and use it in GitHub Desktop.
Example of scala.util.parsing.json
This file contains hidden or 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
forked