On Friday, 24 September 2021 at 08:25:31 UTC+1 Brian Candler wrote:

> The documentation <https://pkg.go.dev/encoding/json#Unmarshal> says it 
> prefers exact match over case-insensitive, but example 3 contradicts that.  
> It seems to be last-match that wins.
>
>
I realise now what they mean now: if there are multiple struct tags defined 
which differ only in case, then the one which matches the incoming field 
exactly is preferred.
https://play.golang.org/p/Do1dPxLOaCj

-- 
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/97551426-0e52-419e-9414-4008b7886d3cn%40googlegroups.com.

Reply via email to