- ObjectMapper.writeValueAsString()でJSON文字列
- ResponseUtil.write()で結果を出力
- ContentTypeは"application/json" とする
public class ItemAction { private static final String APPLICATION_JSON = "application/json"; @Execute(validator = false) public String index() { try { Hoge hoge = new Hoge(); //POJO ObjectMapper mapper = new ObjectMapper(); ResponseUtil.write(mapper.writeValueAsString(hoge),APPLICATION_JSON); } catch (JsonProcessingException e) { //TODO エラー用JSON } return null; } }