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

fix: use default field name when no json tag is provided #16

Merged
merged 1 commit into from
Feb 14, 2019

Conversation

Nazdroth
Copy link
Contributor

Adding default field name when no json tag is provided
for example before :

type UserInfo struct {
    ID string `"groups":"public"`
}

We get as an output:
{ "": "A" }
And now that we use default name if tag is absent we get:
{ "ID": "A" }
which is a similar behaviour as the go default JSON encoder

@coveralls
Copy link

Coverage Status

Coverage increased (+0.4%) to 82.759% when pulling d36d76a on Nazdroth:noJsonTag into bb4d97c on liip:master.

@mweibel mweibel merged commit f4743d6 into liip:master Feb 14, 2019
@mweibel
Copy link
Collaborator

mweibel commented Feb 14, 2019

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants