Asuka-star commented on PR #7639: URL: https://github.com/apache/incubator-seata/pull/7639#issuecomment-3298980091
> > > I think you misunderstood the purpose of this issue. We need to unify Jackson and FastJSON—the JSON serialization libraries—under a single configuration option and provide a factory that returns the corresponding abstract implementation based on that configuration. First, define an interface that abstracts the JSON-related functionality Seata depends on. Then implement that interface twice: once using FastJSON and once using Jackson. Finally, replace all JSON serialization/deserialization code paths to go through a single JSON utility class; this utility class should perform serialization and deserialization and internally load the selected implementation via SPI according to the configuration.我认为您误解了这个问题的目的。我们需要将 Jackson 和 FastJSON(JSON 序列化库)统一到单个配置选项下,并提供一个工厂函数,根据该配置返回相应的抽象实现。首先,定义一个接口,抽象 Seata 所依赖的 JSON 相关功 能。然后,实现该接口两次:一次使用 FastJSON,一次使用 Jackson。最后,将所有 JSON 序列化/反序列化的代码路径替换为单个 JSON 实用程序类;该实用程序类应执行序列化和反序列化,并根据配置通过 SPI 在内部加载所选的实现。 > > > > > > Thanks for the detailed guidance! This is a much better approach. I now understand the plan is to create a common interface and use SPI to load different JSON implementations based on configuration. I will start working on it. I'll let you know if I have any questions感谢您的详细指导!这是一个好得多的方法。我现在明白了,计划是创建一个通用接口,并使用 SPI 根据配置加载不同的 JSON 实现。我会开始着手做这件事。如果我有任何问题,我会告诉你。 > > I think you can refer to the 'discovery' module.我认为您可以参考“发现”模块。 Thanks for the guidance! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
