How do you create Json object with values of different types?
How do you create Json object with values of different types ? I'm using spray-json Here is the code val images : List[JsObject] = fetchImageUrls(url).map((url: String) => { JsObject(List( "link_path" -> JsString(url), "display_name" -> JsString("image"), "size" -> JsString(""), "modified" -> JsString(""), "thumbnail" -> JsString(url), "filename" -> JsString("image"), "is_dir" -> JsBoolean(x = false), "thumb_exists" -> JsBoolean(x = true)) ) }) val jsonAst: JsObject = JsObject(List( "client" -> JsString("urlimages"), "view" -> JsString("thumbnails"), "contents" -> JsArray(images) )) It works