maixiaohai commented on issue #2462: URL: https://github.com/apache/rocketmq/issues/2462#issuecomment-766889841
I recently sorted out the usage of fastjson in different model(acl remoting broker client tools and common). When replacing fastjson with gson, the remoting model will be the most complicated part because we should think about the compatible of lower version client and higher version server. Based on the situation, I made some tests about the compatiblility when client using fastjson and server using gson. In a result, there are some classes which produce non-standard json string and will cause compatibility problem. Here is what I thought 1. we could make a new bridge serializable class, and let the non-compatibility protocol class extends it, then through request version to distinguish which method to use to serialize/deserialize the class. The advantages are the structure of class and meta file will not change, and affect is limited, also the code will be remove easily when client all updated. The disadvantages are the dependency of fastjson will exists in a long term and the compatible code maybe not graceful. 2. Other fastjson annotation problems could be fixed by using different gson parameters. what's the community's opinions? @vongosling @duhenglucky @RongtongJin @ShannonDing ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
