I defined a class in models/ResponseQuery as follows:
case class ResponseQuery(
query: String,
tableArray: Array[String]
)
In a file in app/controllers/ I return an object of type responseQuery
var responseQuery: models.ResponseQuery
Future.successful(Ok(responseQuery))
However, I get the following error while compiling:
Cannot write an instance of
models.ResponseQuerytoHTTP response. Try to define aWriteable[models.ResponseQuery]
I appreciate any help in solving this error.