There is a discussion here
https://groups.google.com/forum/#!searchin/golang-dev/json$20map/golang-dev/5gSHNrJQpUI/vZGSGRmUrC0J
and an issue here: https://github.com/golang/go/issues/12146

At least the issue has an initial example with a value type key

mån 27 nov. 2017 kl 11:21 skrev James <proglot...@gmail.com>:

> Think UnmarshalText needs to have a pointer receiver or you'll only be
> modifying a copy of the struct
>
> On 27 November 2017 at 23:13, Henrik Johansson <dahankz...@gmail.com>
> wrote:
>
>> Hi,
>>
>> https://play.golang.org/p/bLiYSsKL_7
>>
>> I have perhaps missed something simple or misunderstood the contract for
>> MarshalText/UnmarshalText but it seems to me that it should work it just
>> doesn't... :)
>>
>> If I uncomment the return of the parse error "BOOM" then I just get a new
>> "default" key with 3 underscores.
>>
>> Anyone knows what I missed?
>>
>> Thx,
>> Henrik
>>
> --
>> 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.
>>
>

-- 
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.

Reply via email to