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

Encoder: eliding a field name in a struct tag should work #122

Closed
cespare opened this issue Mar 3, 2016 · 0 comments
Closed

Encoder: eliding a field name in a struct tag should work #122

cespare opened this issue Mar 3, 2016 · 0 comments

Comments

@cespare
Copy link
Collaborator

cespare commented Mar 3, 2016

Encoding values of the following type should work:

type Foo struct {
    S string `toml:",omitempty" json:",omitempty"`
}

encoding/json produces (for example): {"S":"asdf"}

This library gives an error: Key '' is not a valid table name. Key names cannot be empty.

@cespare cespare changed the title Eliding a field name in a struct tag should work Encoder: eliding a field name in a struct tag should work Mar 3, 2016
@cespare cespare closed this as completed in 1946733 Mar 3, 2016
mitszo pushed a commit to accense/toml that referenced this issue Jul 19, 2016
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

No branches or pull requests

1 participant