Skip to content

encoding/json: incorrect object key unmarshaling when using custom TextUnmarshaler as Key with string values [1.14 backport] #39585

Closed
@gopherbot

Description

@gopherbot

@mvdan requested issue #39555 to be considered for backport to the next 1.14 minor release.

Thank you for the report. This is indeed a different regression caused by the same original performance optimization, https://golang.org/cl/190659. The previous fix was good as far as I can tell, but it evidently wasn't a complete fix.

It's pretty obvious that the original optimization was a mistake, and applying more best-effort fixes seems too little and too late at this point. I'll send a CL to revert the entire thing, and add more tests. We can backport this into 1.14.5.

@gopherbot please consider this for backport to 1.14, it's a regression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions