We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@ProtobufClass public class Base { @Protobuf(order = 1, fieldType = FieldType.UINT32) private Integer code; @Protobuf(order = 2, fieldType = FieldType.STRING) private String message; } @ProtobufClass public class Demo extends Base { @Protobuf(order = 3, fieldType = FieldType.STRING) private String data;
序列化Demo对象预期结果是code第一位,message第二位,data第三位,但实际结果是data在第一位,code在第二位,message在第三位
The text was updated successfully, but these errors were encountered:
不是太明白问题, pb本身是不会特别指定顺序的,他序列化解析只能是依靠 tag数值, 也就是 @protobuf注释中 的order来指定的。 也测试了你的代码生成的order 是对的
Sorry, something went wrong.
能否把父类字段放前面,有利于省略order定义,父类order不会被子类新增字段打乱
No branches or pull requests
序列化Demo对象预期结果是code第一位,message第二位,data第三位,但实际结果是data在第一位,code在第二位,message在第三位
The text was updated successfully, but these errors were encountered: