struts2 整合json中的有关问题

struts2 整合json中的问题

 

在jquery ajax 和struts2整合过程中,为了控制json返回,可以使用@json来制定那些字段可以返回。。
 @JSON(serialize=true)
 public int getScore() {
  return score;
 }

 public void setScore(int score) {
  this.score = score;
 }
 @JSON(serialize=false)
 public String getOldPhonePwd() {
  return oldPhonePwd;
 }