Hi dubbogo community,

    Today, we found a problem about hessian2
<https://github.com/dubbogo/hessian2>. What type does 'Object[]' of java
correspond to in golang?

    'Object' of java will be decoded to 'interface{}' in golang, so
'Object[]' should be decoded to '[]interface{}'. However,   '[]interface'
of golang  will be decoded to 'ArrayList' of java.
    Then, we should distinguish 'Object[]' from 'ArrayList' in golang. And
I will describe a case:

        1. Define a Object to describe the Object in java.(hessian2/list.go)
        [image: image.png]

       2. Add mapping from 'hessian.Object' to '[object'.
        [image: image.png]

       3. Now, '[]interface{}' is equal to 'ArrayList' and '[]Object'
is equal to 'Object[]'.

       Looking forward to different opinions!

Yours,

Yincheng Fang

Reply via email to