You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/12/16 08:25:38 UTC

[GitHub] [dubbo] YangSihong commented on issue #11042: dubbo3.1 rest protocol :How to specify the SerializerFeature of fastjson

YangSihong commented on issue #11042:
URL: https://github.com/apache/dubbo/issues/11042#issuecomment-1354380132

   > 我看了一下,这个应该可以使用参数 extension 注入自定义的Provider来实现。 如:extension =com.mydubbo.config.GsonJsonProvider ,需实现MessageBodyWriter 和 MessageBodyReader 接口
   > 
   > ** @Provider @consumes({"application/json", "text/json"}) @produces({"application/json", "text/json"}) public class GsonJsonProvider implements MessageBodyReader, MessageBodyWriter **
   我一会试下这种方式,但感觉这种方式怪怪的。
   rest协议下不能像dubbo协议那样在protocol下指定序列化方式吗?然后自定义具体的序列化实现扩展方法。
   我是通过调整依赖包的方式把fastjson序列化给去掉了,目前默认的是resteasy,能够解决我当前空参数据过滤的问题,但我依然没解决如何自定义序列化扩展方法,比如:SerializerFeature.WriteMapNullValue等等


-- 
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