Created
May 3, 2015 05:21
-
-
Save JosephMoniz/b6864ddfd29d3ae7c49e to your computer and use it in GitHub Desktop.
An example on how to construct JSON objects
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 com.plasmaconduit.json._ | |
val verbose = JsObject( | |
"key1" -> JsString("value"), | |
"key2" -> JsInt(42), | |
"key3" -> JsBoolean(true), | |
"key4" -> JsArray(JsInt(3), JsBoolean(true)) | |
) | |
val sugar = JsObject( | |
"key1" -> "value", | |
"key2" -> 42, | |
"key3" -> true, | |
"key4" -> List[JsValue](3, true) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment