Fix @JsonIgnore bug and add unittest

Fix @JsonIgnore bug and add unittest for it