I have many structures in my app. And i want to deserialize all them into []interface{}.
How can i do this? I only can write concrete type array for each structure. Maybe any custom packages can this?
This:
<Root>
<Button></Button>
<Checkbox></Checkbox>
<Someelse></Someelse>
</Root>
to this:
type Root struct {
Content []interface{}
}
How can I unmarshal xml to [...] a []interface?
You cannot. Dead simple. Package encoding/xml does not support this.