使用grails在json中响应的最简单方法是什么?
例如。以下不起作用。
boolean a = false
render a as JSON
请您参考如下方法:
直接来自documentation,类似
render(contentType: "text/json") {
hello = "world"
}
使用grails在json中响应的最简单方法是什么?
例如。以下不起作用。
boolean a = false
render a as JSON
请您参考如下方法:
直接来自documentation,类似
render(contentType: "text/json") {
hello = "world"
}