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? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
如果定义的struct的属性不是以大写的英文开头,比如:
type TestObjectStruct struct { _value int } func (*TestObjectStruct) JavaClassName() string { return "com.caucho.hessian.test.TestObject" }
那么在反序列化的时候,可能会遇到值绑定不上属性的情形:
https://github.com/dubbogo/hessian2/blob/develop/object.go#L299-L301
所以是不是可以使用tag查找属性,然后把值绑定到属性上:
type TestObjectStruct struct { Value int `hessian:"_value"` } func (*TestObjectStruct) JavaClassName() string { return "com.caucho.hessian.test.TestObject" }
The text was updated successfully, but these errors were encountered:
That is a good idea. If there is a tag for a struct member, we enc/dec by its tag name firstly.
Sorry, something went wrong.
No branches or pull requests
如果定义的struct的属性不是以大写的英文开头,比如:
那么在反序列化的时候,可能会遇到值绑定不上属性的情形:
https://github.com/dubbogo/hessian2/blob/develop/object.go#L299-L301
所以是不是可以使用tag查找属性,然后把值绑定到属性上:
The text was updated successfully, but these errors were encountered: