It seems to me that the response is always a map[string]SomeStruct{}. Nothing wrong with that.
On Wednesday, December 7, 2016 at 12:02:57 AM UTC+2, vanmuld...@gmail.com wrote: > > An example JSON response : > > Query : /id/123456 > > Response : > > > {"123456":{"id":123456,"name":"qsdsdqsdqsd","profileIconId":23}} > > The root struct field is a dynamic field based of the parameter I queried? > Is is possible to unmarshal to a struct or should I use map[string] > approach and dig a level deeper myself and then unmarshal that into a > struct? > > > -- 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.