To covert a Go struct, say,
type Person struct {
First string
Last string
}
into a map,
him["First"]=...
him["Last"]=...
One way to do it is to marshall it into json then unmarhall it back.
Is this the easiest way to do it? Is there any easier ways?
Thanks
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.