jjhewlett edited a comment on issue #220:
URL: 
https://github.com/apache/dubbo-go-hessian2/issues/220#issuecomment-675371047


   @wongoo 目前data没有被解析出来
   
![image](https://user-images.githubusercontent.com/69667512/90496512-801e0e80-e178-11ea-82ae-7b1288d3f1fd.png)
   
   ```Go
   import (
        hessian "github.com/apache/dubbo-go-hessian2"
        "fmt"
   )
   
   type ResponseData struct {
        Code string
        Msg  string
        Data map[string]interface{}
   }
   
   
   func (ResponseData) JavaClassName() string {
        return "com.example.dubbo_tools.domain.ResponseData"
   }
   
   func main() {
        res := &ResponseData{}
        res.Code = "0000"
        res.Msg = "成功"
   
        list := []string{"A","B","C"}
        data := map[string]interface{}{
                "count" : 1,
                "data"  : list,
        }
        res.Data = data
   
        e := hessian.NewEncoder()
        err := e.Encode(res)
        if err != nil {
                panic(err)
        }
        bytes := e.Buffer()
        decoder := hessian.NewDecoder(bytes)
        decode, err := decoder.Decode()
        if err != nil {
                panic(err)
        }
        fmt.Println(decode)
   }
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to