Skip to content

encoding/json: document unmarshalling of lowercase keys into exported struct fields #4664

@cespare

Description

@cespare
When unmarshalling a json object with a lowercase name into a struct with a field of the
same name capitalized, json.Unmarshal will match the object name to that struct field.
This behavior is the same in 1.0.3 and tip, and it is not documented on 1.0.3 or tip.

http://tip.play.golang.org/p/8CtjwVlmNL

http://tip.golang.org/pkg/encoding/json/#Unmarshal

It would be good to point this out in the json.Unmarshal doc comment.

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