fastjson的@JSONField注解

序列化

fastjson的@JSONField注解

package com.toltech.phatent.commons.bean;

import java.io.Serializable;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;

/**
 * AuthzReq
 * @author qiuyp
 * @version 1.0
 * @since 2017年8月18日下午6:29:49
 */

//@JSONType(orders ={ "id", "pId", "name", "open" },ignores = { "projectId" }) 


@JSONType(ignores={"sign"})
public class AuthzReq implements Serializable {
    private static final long serialVersionUID = 1L;
    @JSONField(name = "trans_Id")
    private String transId;
    @JSONField(name = "user_name")
    private String userName;
    @JSONField(name = "password")
    private String password;
    @JSONField(name = "user_type")
    private Integer userType;
    private String sign;

    public String getTransId() {
        return transId;
    }

    public void setTransId(String transId) {
        this.transId = transId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Integer getUserType() {
        return userType;
    }

    public void setUserType(Integer userType) {
        this.userType = userType;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }
}

你可能感兴趣的:(fastjson的@JSONField注解)