I'm having an Array[Array[Byte]] and I would like to serialize it to Json in Playframework:
implicit val matrixWrites = new Writes[matrix] {
def writes(c: Matrix): JsValue = {
Json.obj(
"id" -> c.id,
"matr" -> c.matr
)
}
}
However I get the error Type mismatch: found (String, Array[Array[Byte]] required (String, Json.JsValueWrapper)
What is the correct way to turn a Array[Array[Byte]] into Json?