-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
动态嵌套对象的序列化和反序列化 #30
Comments
可以的, |
// 注意这里 attachParams 参数修改为 4 了,上一个示例为 3; 另外这个属性对象为Object,这样在自定义解析中就可以返回任意对象了
@MagicConverter(converter = CustomBookConverter.class, attachParams = "4")
@MagicField(order = 3)
private Object book; |
好的,计划在下个版本增加消息委托。这样就可以直接返回消息实体 |
谢谢大佬! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
根据我需要,我分数据头和数据体两部分,头的格式是固定的,数据体根据也不同结构也不一样,我能否直接通过仅在一个对象里封装头和数据体,来进行序列化和反序列化,就像下面代码的样子。或者别的方法来实现动态选择不同的数据体格式做序列化和反序列化?我不想先从二进制解出来一个头,然后拿着剩余的二进制数据再判断解析数据体,太麻烦了。
The text was updated successfully, but these errors were encountered: