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
What happened: 2022/07/02 23:38:21 original struct {"UserFullName":"mark4z","FamilyPhoneNumber":"010-12345678","Slice":null} 2022/07/02 23:38:21 C�com.company.myuser��user_full_name�familyPhoneNumber�slice`�mark4z010-12345678V�[string� 2022/07/02 23:38:21 decode struct {"UserFullName":"mark4z","FamilyPhoneNumber":"010-12345678","Slice":[]}
What you expected to happen: nil slice marshal and unMarshal shoulde still equals the 'nil'
How to reproduce it (as minimally and precisely as possible):
type MyUser struct { UserFullName string `hessian:"user_full_name"` FamilyPhoneNumber string // default convert to => familyPhoneNumber Slice []string } func (MyUser) JavaClassName() string { return "com.company.myuser" } func main() { user := &MyUser{ UserFullName: "mark4z", FamilyPhoneNumber: "010-12345678", Slice: nil, } jsonStr, _ := json.Marshal(user) log.Printf("original struct %s", jsonStr) e := hessian.NewEncoder() _ = e.Encode(user) buffer := e.Buffer() log.Printf("%s", buffer) decoder := hessian.NewDecoder(buffer) decode, _ := decoder.Decode() jsonStr, _ = json.Marshal(decode) log.Printf("decode struct %s", jsonStr) }
Anything else we need to know?:
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
close via #318
No branches or pull requests
What happened:
2022/07/02 23:38:21 original struct {"UserFullName":"mark4z","FamilyPhoneNumber":"010-12345678","Slice":null}
2022/07/02 23:38:21 C�com.company.myuser��user_full_name�familyPhoneNumber�slice`�mark4z010-12345678V�[string�
2022/07/02 23:38:21 decode struct {"UserFullName":"mark4z","FamilyPhoneNumber":"010-12345678","Slice":[]}
What you expected to happen:
nil slice marshal and unMarshal shoulde still equals the 'nil'
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
The text was updated successfully, but these errors were encountered: