RosettaCodeData/Task/JSON/Scala/json.scala
Ingy döt Net 1e05ecd7ee First commit of partial RosettaCode contents.
Pushing this for testing purposes. Lots of work still needed.
2013-04-08 13:02:41 -07:00

8 lines
276 B
Scala

scala> import scala.util.parsing.json.{JSON, JSONObject}
import scala.util.parsing.json.{JSON, JSONObject}
scala> JSON.parseFull("""{"foo": "bar"}""")
res0: Option[Any] = Some(Map(foo -> bar))
scala> JSONObject(Map("foo" -> "bar")).toString()
res1: String = {"foo" : "bar"}