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
支持直接根据.proto描述文件动态生成protobuf操作对象,这样可以极简化google protobuf的使用,同时针对需要动态根据.proto描述文件进行操作的实现也是非常有用的帮助
The text was updated successfully, but these errors were encountered:
功能已经增加,详见使用说明
Sorry, something went wrong.
该功能目前不支持嵌套对象的方式,只能支持单对象定义的proto描述文件
在1.0.3版本中,已经支持了对嵌套对象的功能支持。 IDLProxyObject object = ProtobufIDLProxy.createSingle(protoCotent); //if .proto IDL defines multiple messages use as follow //Map<String, IDLProxyObject> objects = ProtobufIDLProxy.create(protoCotent); // 动态设置字段值 object.put("message", "hello你好"); //propogation object set //object.put("sub.field", "hello world"); // protobuf 序列化 byte[] bb = object.encode();
// protobuf 反序列化 IDLProxyObject result = object.decode(bb); Assert.assertEquals("hello你好", result.get("message")); //propogation object get //result.get("sub.field");
xiemalin
No branches or pull requests
支持直接根据.proto描述文件动态生成protobuf操作对象,这样可以极简化google protobuf的使用,同时针对需要动态根据.proto描述文件进行操作的实现也是非常有用的帮助
The text was updated successfully, but these errors were encountered: