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/574cb836-c77f-44e5-841e-920b5b1bf48an%40googlegroups.com.

Reply via email to