Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@JSONField 会支持 fastjson 1.x 中 serialize 吗 #8

Closed
JiakunXu opened this issue Apr 18, 2022 · 5 comments
Closed

@JSONField 会支持 fastjson 1.x 中 serialize 吗 #8

JiakunXu opened this issue Apr 18, 2022 · 5 comments
Labels
bug Something isn't working
Milestone

Comments

@JiakunXu
Copy link

 public class A {
      @JSONField(serialize=false)
      public Date date;
 }

 public class A {
      @JSONField(deserialize=false)
      public Date date;
 }

@wenshao
Copy link
Member

wenshao commented Apr 18, 2022

考虑到更好的易用性,改名JSONField.write了:
比如说:

import com.alibaba.fastjson2.annotation.JSONField;

  public class Bean {
        private String x;

        @JSONField(write = false)
        public String getX() {
            return x;
        }

        public void setX(String x) {
            this.x = x;
        }
    }

@wenshao wenshao added the question Further information is requested label Apr 18, 2022
@wenshao
Copy link
Member

wenshao commented Apr 18, 2022

对于fastjson 1.x的JSONField的Annotation,我会在周末发布一个新版本2.0.2支持。

@wenshao wenshao added this to the 2.0.2 milestone Apr 18, 2022
@wenshao wenshao added bug Something isn't working and removed question Further information is requested labels Apr 18, 2022
@wanghuzhou
Copy link

这一点都不易用,用了这么久的serialize,deserialize 突然换名,很不方便,老项目根本没人升级用它。哪怕是个初学者用2.x,人家网上一搜,结果都是1.x的内容,这不是制造升级障碍

@wenshao
Copy link
Member

wenshao commented Apr 22, 2022

收到反馈,我想想哈

@wenshao
Copy link
Member

wenshao commented May 2, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.2
问题已修复,请使用新版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants