Closed duongxinh2003 closed 2 weeks ago
By default, you can get a unified behavior, which can be well compatible when switching protocols, such as switching between json, prootbuf, or other protocols.
If the situation is special, it is recommended to rewrite MessageToMessageCodec to implement this part of the customization.
I closed the issue because some languages have libraries that can convert directly like Java, C#,...
新增功能的使用场景
When you use
JsonDataCodec
for codec protocol, you must convert byte array to JSON data and use it. For example: A request you send from the client has pattern (following by example github example ):[123,34,110,...]
You must convert this byte[] at
data
field to use it. It takes 2 times to transform data in the client to use it, you can convert data to JSON and serialize it before sending to the client instead. Example: