{"action":"created","issue":{"url":"https://api.github.com/repos/square/moshi/issues/29","labels_url":"https://api.github.com/repos/square/moshi/issues/29/labels{/name}","comments_url":"https://api.github.com/repos/square/moshi/issues/29/comments","events_url":"https://api.github.com/repos/square/moshi/issues/29/events","html_url":"https://github.com/square/moshi/issues/29","id":65308926,"number":29,"title":"Support magical toJson(), fromJson() methods","user":{"login":"swankjesse","id":133019,"avatar_url":"https://avatars.githubusercontent.com/u/133019?v=3","gravatar_id":"","url":"https://api.github.com/users/swankjesse","html_url":"https://github.com/swankjesse","followers_url":"https://api.github.com/users/swankjesse/followers","following_url":"https://api.github.com/users/swankjesse/following{/other_user}","gists_url":"https://api.github.com/users/swankjesse/gists{/gist_id}","starred_url":"https://api.github.com/users/swankjesse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/swankjesse/subscriptions","organizations_url":"https://api.github.com/users/swankjesse/orgs","repos_url":"https://api.github.com/users/swankjesse/repos","events_url":"https://api.github.com/users/swankjesse/events{/privacy}","received_events_url":"https://api.github.com/users/swankjesse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-03-30T21:44:37Z","updated_at":"2015-11-25T16:57:11Z","closed_at":"2015-06-01T04:36:10Z","body":"Classes can declare the following methods:\r\n```\r\n <any access modifier> Object toJson();\r\n <any access modifier> public static Object fromJson(Object json);\r\n```\r\nIf they do, Moshi honors ‘em. The returned objects are then themselves converted to JSON. The idea is that if you’re implementing a library class (say OkHttp’s Request) it can define it’s own JSON form without a compile-time dependency on Moshi. If this works I’ll talk to Tatu (Jackson) and Inder/Joel (gson) to try to make it a universally-supported pattern.\r\n"},"comment":{"url":"https://api.github.com/repos/square/moshi/issues/comments/159671094","html_url":"https://github.com/square/moshi/issues/29#issuecomment-159671094","issue_url":"https://api.github.com/repos/square/moshi/issues/29","id":159671094,"user":{"login":"johnjohndoe","id":144518,"avatar_url":"https://avatars.githubusercontent.com/u/144518?v=3","gravatar_id":"","url":"https://api.github.com/users/johnjohndoe","html_url":"https://github.com/johnjohndoe","followers_url":"https://api.github.com/users/johnjohndoe/followers","following_url":"https://api.github.com/users/johnjohndoe/following{/other_user}","gists_url":"https://api.github.com/users/johnjohndoe/gists{/gist_id}","starred_url":"https://api.github.com/users/johnjohndoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnjohndoe/subscriptions","organizations_url":"https://api.github.com/users/johnjohndoe/orgs","repos_url":"https://api.github.com/users/johnjohndoe/repos","events_url":"https://api.github.com/users/johnjohndoe/events{/privacy}","received_events_url":"https://api.github.com/users/johnjohndoe/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T16:57:11Z","updated_at":"2015-11-25T16:57:11Z","body":"@swankjesse Thanks for sharing the adapter snippet!"}}