{"action":"opened","issue":{"url":"https://api.github.com/repos/serde-rs/serde/issues/140","labels_url":"https://api.github.com/repos/serde-rs/serde/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/serde-rs/serde/issues/140/comments","events_url":"https://api.github.com/repos/serde-rs/serde/issues/140/events","html_url":"https://github.com/serde-rs/serde/issues/140","id":102426499,"number":140,"title":"Add struct-level annotation for renaming fields","user":{"login":"erickt","id":84711,"avatar_url":"https://avatars.githubusercontent.com/u/84711?v=3","gravatar_id":"","url":"https://api.github.com/users/erickt","html_url":"https://github.com/erickt","followers_url":"https://api.github.com/users/erickt/followers","following_url":"https://api.github.com/users/erickt/following{/other_user}","gists_url":"https://api.github.com/users/erickt/gists{/gist_id}","starred_url":"https://api.github.com/users/erickt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickt/subscriptions","organizations_url":"https://api.github.com/users/erickt/orgs","repos_url":"https://api.github.com/users/erickt/repos","events_url":"https://api.github.com/users/erickt/events{/privacy}","received_events_url":"https://api.github.com/users/erickt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-21T17:23:48Z","updated_at":"2015-08-21T17:23:48Z","closed_at":null,"body":"For example:\r\n\r\n```rust\r\n#[serde(rename_camel_case)]\r\n#[derive(Serialize, Deserialize)]\r\nstruct CamelCase {\r\n  foo_bar_baz: usize\r\n}\r\n\r\n#[serde(rename_underscore_to_hypens)]\r\n#[derive(Serialize, Deserialize)]\r\nstruct Hyphens {\r\n  foo_bar_baz: usize\r\n}\r\n\r\n```\r\n\r\nWould get serialized to `fooBarBaz`, and `foo-bar-baz`. "}}