Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: encoding/json: Field Naming strategy #16543

ysaakpr opened this issue Jul 29, 2016 · 1 comment


None yet
3 participants
Copy link

commented Jul 29, 2016

Is it possible to have something similar like Jackson kind of configuration options in json library

  1. Naming Strategy
  2. Ignore null
  3. Accept single value as array
  4. Fail on unknown properties.
  5. Map unknown properties in a known json to different section.

These all are very useful handy configuration when we deal with serializations and de-serializations.
Can we get this supports added to the existing json library.

@ysaakpr ysaakpr changed the title Proposal: Json Filed Naming strategy Proposal: Json Field Naming strategy Jul 30, 2016


This comment has been minimized.

Copy link

commented Aug 1, 2016

I think this is a dupe of #16426. You can already do 2 and 3 by implementing the Unmarshaler interface, and you can do 1 with struct tags. 4 and 5 are part of #16426.

@quentinmit quentinmit closed this Aug 1, 2016

@golang golang locked and limited conversation to collaborators Aug 1, 2017

@mikioh mikioh changed the title Proposal: Json Field Naming strategy Proposal: encoding/json: Field Naming strategy Aug 3, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.