UnmarshalTypeError does not provide Field name anynmore

I’m using a custom unmarshaler in my code for dedicated types, in case of error my code was returning a json.UnmarhsalTypeError

This allowed to retrieve field name where the error occured in case type was used within a structure with standard JSON unmarshaller

Since I migrated to go1.11 today, my code do not allow to retrieve field name anymore (was Ok in go1.10.3)

Looking at new version of decode.go I could not find an easy workaround to this behavior change

here is a simple playground sample that highlight behavior
https://play.golang.org/p/AtX-5f5jWwS

Is this a regression or an unexpected behavior that dosappeared unfortunately ?

Thanks for your help

I think this is being tracked here: https://github.com/golang/go/issues/27275

Thanks for the link, I indeed saw this issue prior to logging this request for help
Unfortunately this is not exactly the same Issue

and I tested proposed fix, and this does not fix restore previous behavior

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.