Thanks Brian, that's actually similar to what I'm already doing. Cheers!
On Wednesday, December 7, 2022 at 8:16:53 AM UTC-3 Brian Candler wrote: > On Tuesday, 6 December 2022 at 22:27:38 UTC dple...@google.com wrote: > >> It'd be great if, for example, you could tag an entire type like: >> >> type Row struct { `json:tuple` >> date int64 >> score float64 >> city string >> } >> >> so that >> >> var v []Row >> json.Unmarshal(data, &v) >> >> would automatically parse the triples into usable structs (and >> json.Marshal would turn them back into lists). >> > > You can wrap that pattern yourself though, and it's not too much work. > https://go.dev/play/p/JtUxQUQdd92 > > -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/0d101208-c021-4fb2-add4-ca498437e04fn%40googlegroups.com.