FW/1には機能が埋め込まれている
private string function renderDataWithContentType() {
var out = '';
var contentType = '';
var type = request._fw1.renderData.type;
var data = request._fw1.renderData.data;
var statusCode = request._fw1.renderData.statusCode;
switch ( type ) {
case 'json':
contentType = 'application/json; charset=utf-8';
out = serializeJSON( data );
break;
application/json、text/xml、text/plain を返すメカニズムが組み込まれているようです。
I can't find any documentation on how to trigger this.
Note: this is not a duplicate of: How do I return JSON from an action in FW/1?