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

[FEATURE]兼容fastjson特性BeforeFilter,AfterFilter #359

Closed
supenBenny opened this issue May 26, 2022 · 1 comment
Closed

[FEATURE]兼容fastjson特性BeforeFilter,AfterFilter #359

supenBenny opened this issue May 26, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@supenBenny
Copy link

请描述您的需求或者改进建议

序列化时在最前或最后添加内容
fastjson1有BeforeFilter,AfterFilter可以实现,fastjson2中没有找到相关方法

请描述你建议的实现方案

用户表有部门ID,希望在转json时可以动态增加部门名称字段
`public interface PropertyPreFilter extends Filter {
default void process(JSONWriter writer, Object source, String name,Object value){

}
}`
有JSONWriter,原对象、属性名、属性值,便可追加一个属性

@supenBenny supenBenny added the enhancement New feature or request label May 26, 2022
@wenshao wenshao added this to the 2.0.5 milestone May 26, 2022
@wenshao
Copy link
Member

wenshao commented May 28, 2022

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

@wenshao wenshao closed this as completed May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants