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
当反序列化一个对象的时候,发生错误。但是同样的请求用java反序列化正常。 相关代码
type TriggerParam struct { JobId int ExecutorHandler string ExecutorParams string ExecutorBlockStrategy string ExecutorTimeout int LogId int LogDateTim int GlueType string GlueSource string GlueUpdatetime int BroadcastIndex int BroadcastTotal int } func (TriggerParam) JavaClassName() string { return "com.xxl.job.core.biz.model.TriggerParam" } type XxlRpcRequest struct { RequestId string CreateMillisTime int AccessToken string ClassName string MethodName string ParameterTypes []java_exception.Class Parameters []interface{} Version string } func (XxlRpcRequest) JavaClassName() string { return "com.xxl.rpc.remoting.net.params.XxlRpcRequest" } func TestSerializerFile(t *testing.T) { RegisterPOJO(XxlRpcRequest{}) RegisterPOJO(TriggerParam{}) f, _ := os.Open("test.dat") bt, _ := ioutil.ReadAll(f) _ = f.Close() for e := range bt { fmt.Printf("0x%x ", bt[e]) } fmt.Println() fmt.Println(string(bt)) d := NewDecoder(bt) res, err := d.Decode() if err != nil { t.Errorf("Decode() = %+v", err) } resJson, _ := json.Marshal(res) t.Logf("decode = %v, %v\n", string(resJson), err) }
二进制文件:https://github.com/sniperking1234/dubbo-go-hessian2/blob/xxl-job/test.dat 解析的时候报错 用java反序列化的结果:
The text was updated successfully, but these errors were encountered:
unsupported generics
Sorry, something went wrong.
No branches or pull requests
当反序列化一个对象的时候,发生错误。但是同样的请求用java反序列化正常。
相关代码
二进制文件:https://github.com/sniperking1234/dubbo-go-hessian2/blob/xxl-job/test.dat
![image](https://user-images.githubusercontent.com/7834655/63004649-7864c380-bead-11e9-9919-68cd4dea1724.png)
![image](https://user-images.githubusercontent.com/7834655/63015192-e5368880-bec2-11e9-97a9-105e989e75e1.png)
解析的时候报错
用java反序列化的结果:
The text was updated successfully, but these errors were encountered: