I am trying to construct json string from array. I am able to get json string format using JsonAST as below :
import net.liftweb.json.JsonAST
import net.liftweb.json.JsonDSL._
import net.liftweb.json.Printer._
val map = Map("a" -> "b", "c" -> "d")
val c = compact(JsonAST.render(map))
println(c) //op : {"a":"b","c":"d"}
When i try to do the same thing with array, it is throwing below error : required: net.liftweb.json.JsonAST.JValue
I am looking for serializing an array like val a = Array(1,2,3)
What is the common way of getting json response, which supports all data structures?