You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "luger1990 (via GitHub)" <gi...@apache.org> on 2023/06/08 06:51:45 UTC
[GitHub] [dubbo] luger1990 opened a new issue, #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
luger1990 opened a new issue, #12478:
URL: https://github.com/apache/dubbo/issues/12478
dubbo3.2默认使用fastjson2作为默认序列化的工具,我有个疑问,如果一个传输DTO对象有个字段使用了 @JSONField(serialize = false)注解,既然用fastjson2作为序列化,那这个注解的含义就是序列化的时候忽略这个字段。那么这是不是代表这个字段对消费者不可见?也就是获取不到这个字段的值?
但是我测了测加上这个注解消费者依然可以获取到这个字段。所以有些疑惑麻烦帮忙解答。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] EarthChen closed issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "EarthChen (via GitHub)" <gi...@apache.org>.
EarthChen closed issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
URL: https://github.com/apache/dubbo/issues/12478
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] luger1990 commented on issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "luger1990 (via GitHub)" <gi...@apache.org>.
luger1990 commented on issue #12478:
URL: https://github.com/apache/dubbo/issues/12478#issuecomment-1590807714
> > 但是我测了测加上这个注解消费者依然可以获取到这个字段。所以有些疑惑麻烦帮忙解答。
> > 20230612更新: 我又测试了一下传输DTO对象用了这个注解确实会忽略这个字段。。
>
> 没太清楚现在的问题是什么
就是provider中的DTO 一个属性加了@JSONField(serialize = false)注解,就会导致consumer获取不到这个字段,因为用的是fastjson2序列化,fastjson2根据注解忽略这个字段了。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] AlbumenJ commented on issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #12478:
URL: https://github.com/apache/dubbo/issues/12478#issuecomment-1587230291
> 但是我测了测加上这个注解消费者依然可以获取到这个字段。所以有些疑惑麻烦帮忙解答。
>
> 20230612更新: 我又测试了一下传输DTO对象用了这个注解确实会忽略这个字段。。
没太清楚现在的问题是什么
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] EarthChen commented on issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "EarthChen (via GitHub)" <gi...@apache.org>.
EarthChen commented on issue #12478:
URL: https://github.com/apache/dubbo/issues/12478#issuecomment-1594037745
> > > 但是我测了测加上这个注解消费者依然可以获取到这个字段。所以有些疑惑麻烦帮忙解答。
> > > 20230612更新: 我又测试了一下传输DTO对象用了这个注解确实会忽略这个字段。。
> >
> >
> > 没太清楚现在的问题是什么
>
> 就是provider中的DTO 一个属性加了@JSONField(serialize = false)注解,就会导致consumer获取不到这个字段,因为用的是fastjson2序列化,fastjson2根据注解忽略这个字段了。
这是合理的阿 fastjson那边的处理逻辑
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] EarthChen commented on issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "EarthChen (via GitHub)" <gi...@apache.org>.
EarthChen commented on issue #12478:
URL: https://github.com/apache/dubbo/issues/12478#issuecomment-1589352418
> @AlbumenJ 为什么现在默认选json啊,性能不是不如hessian2吗
默认使用的 jsonb 模式 不是json 模式,性能比 hessian 好很多
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org
[GitHub] [dubbo] twogoods commented on issue #12478: 关于dubbo3.2默认使用fastjson2中的一个疑问,涉及@JSONField(serialize = false) 注解
Posted by "twogoods (via GitHub)" <gi...@apache.org>.
twogoods commented on issue #12478:
URL: https://github.com/apache/dubbo/issues/12478#issuecomment-1588487419
@AlbumenJ 为什么现在默认选json啊,性能不是不如hessian2吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org