I created an issue for this on github.

https://github.com/golang/go/issues/20735

Regards,
Dat.





On Wed, Jun 21, 2017 at 9:30 AM, Ian Lance Taylor <i...@golang.org> wrote:

> On Mon, Jun 19, 2017 at 3:40 PM, Dat Huynh <audathu...@gmail.com> wrote:
> >
> > I am using the libraries "encoding/xml" and "encoding/json" to marshal
> and
> > unmarshal a slice.
> >
> > I wonder why the method Unmarshal in encoding/xml does not return a
> slice as
> > what I have from encoding/json.
> >
> > The below is my example.
> > https://play.golang.org/p/ZlALkyCbzX
> >
> > Do I miss something or is this a bug of the library?
>
> I'm not sure how to answer this other than to say that XML and JSON
> are different representations that serve different needs and work in
> different ways.  They aren't intended to be interchangeable.  See
> https://golang.org/pkg/encoding/xml/#pkg-note-BUG .
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to