{"action":"created","issue":{"url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/25","labels_url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/25/labels{/name}","comments_url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/25/comments","events_url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/25/events","html_url":"https://github.com/alexarchambault/argonaut-shapeless/issues/25","id":96429419,"number":25,"title":"Prefer hand crafted Decode / Encode Typeclasses for nested Types","user":{"login":"penland365","id":1630235,"avatar_url":"https://avatars.githubusercontent.com/u/1630235?v=3","gravatar_id":"","url":"https://api.github.com/users/penland365","html_url":"https://github.com/penland365","followers_url":"https://api.github.com/users/penland365/followers","following_url":"https://api.github.com/users/penland365/following{/other_user}","gists_url":"https://api.github.com/users/penland365/gists{/gist_id}","starred_url":"https://api.github.com/users/penland365/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/penland365/subscriptions","organizations_url":"https://api.github.com/users/penland365/orgs","repos_url":"https://api.github.com/users/penland365/repos","events_url":"https://api.github.com/users/penland365/events{/privacy}","received_events_url":"https://api.github.com/users/penland365/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/milestones/1","html_url":"https://github.com/alexarchambault/argonaut-shapeless/milestones/0.4.0","labels_url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/milestones/1/labels","id":1175017,"number":1,"title":"0.4.0","description":"","creator":{"login":"alexarchambault","id":7063723,"avatar_url":"https://avatars.githubusercontent.com/u/7063723?v=3","gravatar_id":"","url":"https://api.github.com/users/alexarchambault","html_url":"https://github.com/alexarchambault","followers_url":"https://api.github.com/users/alexarchambault/followers","following_url":"https://api.github.com/users/alexarchambault/following{/other_user}","gists_url":"https://api.github.com/users/alexarchambault/gists{/gist_id}","starred_url":"https://api.github.com/users/alexarchambault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexarchambault/subscriptions","organizations_url":"https://api.github.com/users/alexarchambault/orgs","repos_url":"https://api.github.com/users/alexarchambault/repos","events_url":"https://api.github.com/users/alexarchambault/events{/privacy}","received_events_url":"https://api.github.com/users/alexarchambault/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-06-22T12:25:18Z","updated_at":"2015-07-21T22:40:10Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-07-21T22:16:45Z","updated_at":"2015-09-08T06:48:59Z","closed_at":null,"body":"** Note - It's possible I don't now how to use the library correctly.  Shapeless based libs are new enough to me that I'm not 100% sure this isn't currently possible\r\n\r\nWhen dealing with deeply nested `Json`, (particularly 3rd party `Json`), it's not uncommon to have to have a `Json` field name be a non-valid parameter name, for example:\r\n```json\r\n{\r\n  \"points\" :  {\r\n    \"for\" : 2,\r\n    \"against\" : 1\r\n  }\r\n}\r\n```\r\nIn cases like this, we have to use custom `DecodeJson[Points]` typeclasses. This how bars us from using `implicitly[DecodeJson[A]]` for any type that composes the previously described `Points` type.  Example:\r\n```json\r\n{\r\n  \"name\" : \"Yankees\",\r\n  \"location\" : \"New York City\",\r\n  \"points\" : {\r\n    \"for\" : 2,\r\n    \"against\" : 1\r\n  }\r\n}\r\n```\r\nGiven the following code:\r\n```scala\r\ncase class Points(pointsFor: Int, against: Int)\r\n//decode typeclass provided\r\ncase class Team(name: String, location: String, points: Points)\r\nimplicit val decodeJson = implicitly[DecodeJson[Team]]\r\n```\r\nwe fail to decode provided json with an error message of `cursor failed on --\\ \"pointsFor\"`\r\n\r\nI'm not even sure it's possible, but it would be nice if we could defer to any pre-defined typclasses for encoding / decoding.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/comments/138452585","html_url":"https://github.com/alexarchambault/argonaut-shapeless/issues/25#issuecomment-138452585","issue_url":"https://api.github.com/repos/alexarchambault/argonaut-shapeless/issues/25","id":138452585,"user":{"login":"2chilled","id":1238350,"avatar_url":"https://avatars.githubusercontent.com/u/1238350?v=3","gravatar_id":"","url":"https://api.github.com/users/2chilled","html_url":"https://github.com/2chilled","followers_url":"https://api.github.com/users/2chilled/followers","following_url":"https://api.github.com/users/2chilled/following{/other_user}","gists_url":"https://api.github.com/users/2chilled/gists{/gist_id}","starred_url":"https://api.github.com/users/2chilled/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/2chilled/subscriptions","organizations_url":"https://api.github.com/users/2chilled/orgs","repos_url":"https://api.github.com/users/2chilled/repos","events_url":"https://api.github.com/users/2chilled/events{/privacy}","received_events_url":"https://api.github.com/users/2chilled/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T06:48:59Z","updated_at":"2015-09-08T06:48:59Z","body":"Upvote! Without this being fixed the library is useless for us at the moment. "}}