{"action":"created","issue":{"url":"https://api.github.com/repos/erickt/rust-serde/issues/45","labels_url":"https://api.github.com/repos/erickt/rust-serde/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/erickt/rust-serde/issues/45/comments","events_url":"https://api.github.com/repos/erickt/rust-serde/issues/45/events","html_url":"https://github.com/erickt/rust-serde/issues/45","id":63283684,"number":45,"title":"`Box<_>` support for serde","user":{"login":"Byron","id":63622,"avatar_url":"https://avatars.githubusercontent.com/u/63622?v=3","gravatar_id":"","url":"https://api.github.com/users/Byron","html_url":"https://github.com/Byron","followers_url":"https://api.github.com/users/Byron/followers","following_url":"https://api.github.com/users/Byron/following{/other_user}","gists_url":"https://api.github.com/users/Byron/gists{/gist_id}","starred_url":"https://api.github.com/users/Byron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Byron/subscriptions","organizations_url":"https://api.github.com/users/Byron/orgs","repos_url":"https://api.github.com/users/Byron/repos","events_url":"https://api.github.com/users/Byron/events{/privacy}","received_events_url":"https://api.github.com/users/Byron/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-20T19:01:41Z","updated_at":"2015-04-05T12:48:28Z","closed_at":null,"body":"I have a recursive structure which looks very much like this:\r\n\r\n```Rust\r\n/// There is no detailed description.\r\n/// \r\n/// This type is not used in any activity, and only used as *part* of another schema.\r\n/// \r\n#[derive(Default, Clone, Debug, Serialize, Deserialize)]\r\npub struct ItemScope {\r\n    /// The start date and time of the event (in ISO 8601 date format).    \r\n    #[serde(alias=\"startDate\")]\r\n    pub start_date: String,\r\n    /// The end date and time of the event (in ISO 8601 date format).    \r\n    #[serde(alias=\"endDate\")]\r\n    pub end_date: String,\r\n    /// The text that is the result of the app activity. For example, if a user leaves a review of a restaurant, this might be the text of the review.    \r\n    pub text: String,\r\n    /// A URL to the image that represents this result. For example, if a user writes a review of a restaurant and attaches a photo of their meal, you might use that photo as the result.image.    \r\n    pub image: String,\r\n    /// Review rating.    \r\n    #[serde(alias=\"reviewRating\")]\r\n    pub review_rating: Option<Box<ItemScope>>,\r\n}\r\n```\r\n\r\nAs you can see, I have to use a `Box` to allow such a struct to exist. With `rustc_serialize`, I was able to encode and decode it, with `serde` I get errors like this:\r\n```\r\nthe trait `serde::de::Deserialize` is not implemented for the type `Box<ItemScope>`\r\n```\r\n\r\nThis is just happening for me in the `plus1` API, so it's by no means a show-stopper.\r\nAlso I may note that with an older compiler version (and rustc_serialize) I was able to just use `Box<ItemScope>` without issues. Now, it really wants `Option<Box<ItemScope>>` - may be a bug.\r\n\r\nDetails on where this issue is coming from can be [watched on youtube](http://youtu.be/6KmNc7KxV6o).\r\n\r\n### Meta \r\n```bash\r\n✗ rustc --version --verbose\r\nrustc 1.0.0-nightly (ea8b82e90 2015-03-17) (built 2015-03-18)\r\nbinary: rustc\r\ncommit-hash: ea8b82e90c450febb1f26a07862a1ec89c22addd\r\ncommit-date: 2015-03-17\r\nbuild-date: 2015-03-18\r\nhost: x86_64-apple-darwin\r\nrelease: 1.0.0-nightly\r\n```\r\n```bash\r\n➜  rust-serde git:(master) glog\r\n* 42bd905 (HEAD, mine/master, master) fix(macros): fully qualified usage of `Result`\r\n* 5378d22 (origin/master, origin/HEAD) Switch to the new custom_deserialize syntax\r\n* c8b2ad0 Update to rust HEAD\r\n* e778c7e Update to rust HEAD\r\n*   f0d0dd2 Merge pull request #41 from hugoduncan/feature/mark-field-attributes-used\r\n|\\\r\n| * 3e63d34 Mark serde field attributes as used\r\n|/\r\n```"},"comment":{"url":"https://api.github.com/repos/erickt/rust-serde/issues/comments/89765517","html_url":"https://github.com/erickt/rust-serde/issues/45#issuecomment-89765517","issue_url":"https://api.github.com/repos/erickt/rust-serde/issues/45","id":89765517,"user":{"login":"tomprogrammer","id":57975,"avatar_url":"https://avatars.githubusercontent.com/u/57975?v=3","gravatar_id":"","url":"https://api.github.com/users/tomprogrammer","html_url":"https://github.com/tomprogrammer","followers_url":"https://api.github.com/users/tomprogrammer/followers","following_url":"https://api.github.com/users/tomprogrammer/following{/other_user}","gists_url":"https://api.github.com/users/tomprogrammer/gists{/gist_id}","starred_url":"https://api.github.com/users/tomprogrammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomprogrammer/subscriptions","organizations_url":"https://api.github.com/users/tomprogrammer/orgs","repos_url":"https://api.github.com/users/tomprogrammer/repos","events_url":"https://api.github.com/users/tomprogrammer/events{/privacy}","received_events_url":"https://api.github.com/users/tomprogrammer/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T12:48:28Z","updated_at":"2015-04-05T12:48:28Z","body":"Is this fixed by https://github.com/erickt/rust-serde/pull/49?"}}