-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
无法从 dict 反序列化为 Message #127
Comments
QQ 适配器的 MessageSegment 是 abstract class 所以是无法实例化的,需要使用子类型才行 |
不能根据 type 实例化成对应的子类型吗? |
看了下似乎可以覆盖掉 segment 父类的 validate 方法来做到,不过这就是体力活了。 |
不太确定这个是否应该由适配器实现,还是让需要反序列化的插件自行实现? |
欢迎PR到适配器( |
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: