{"action":"created","comment":{"url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/comments/91406536","pull_request_review_id":11915171,"id":91406536,"diff_hunk":"@@ -0,0 +1,62 @@\n+package fommil.sjs\n+\n+import spray.json._\n+import shapeless._\n+import shapeless.labelled._\n+\n+/**\n+ * Generic marshallers for extensible records\n+ */\n+object RecordFormats {\n+  /**\n+   * Formats HNil\n+   */\n+  implicit val hNilWriter: JsonWriter[HNil] = (_: HNil) => JsObject()\n+\n+  /**\n+   * Formats HList representing extensible record\n+   */\n+  implicit def recordWriter[K <: Symbol, H, T <: HList](implicit\n+    witness: Witness.Aux[K],\n+    hWriter: Lazy[JsonWriter[H]],\n+    tWriter: JsonWriter[T]): JsonWriter[FieldType[K, H] :: T] =\n+    (hl: FieldType[K, H] :: T) => {\n+      JsObject(\n+        JsObject(witness.value.name -> hWriter.value.write(hl.head)).fields ++\n+          tWriter.write(hl.tail).asInstanceOf[JsObject].fields","path":"src/main/scala/fommil/sjs/RecordFormats.scala","position":26,"original_position":26,"commit_id":"2aa40c14f9d0e6d896b075489fc70ab1575e4d9b","original_commit_id":"2aa40c14f9d0e6d896b075489fc70ab1575e4d9b","user":{"login":"danslapman","id":1708325,"avatar_url":"https://avatars.githubusercontent.com/u/1708325?v=3","gravatar_id":"","url":"https://api.github.com/users/danslapman","html_url":"https://github.com/danslapman","followers_url":"https://api.github.com/users/danslapman/followers","following_url":"https://api.github.com/users/danslapman/following{/other_user}","gists_url":"https://api.github.com/users/danslapman/gists{/gist_id}","starred_url":"https://api.github.com/users/danslapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danslapman/subscriptions","organizations_url":"https://api.github.com/users/danslapman/orgs","repos_url":"https://api.github.com/users/danslapman/repos","events_url":"https://api.github.com/users/danslapman/events{/privacy}","received_events_url":"https://api.github.com/users/danslapman/received_events","type":"User","site_admin":false},"body":"In this particular case the cast wouldn't fail in practice: it's just a \"recursive\" call","created_at":"2016-12-07T22:53:03Z","updated_at":"2016-12-07T22:53:03Z","html_url":"https://github.com/fommil/spray-json-shapeless/pull/30#discussion_r91406536","pull_request_url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/comments/91406536"},"html":{"href":"https://github.com/fommil/spray-json-shapeless/pull/30#discussion_r91406536"},"pull_request":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30","id":97020140,"html_url":"https://github.com/fommil/spray-json-shapeless/pull/30","diff_url":"https://github.com/fommil/spray-json-shapeless/pull/30.diff","patch_url":"https://github.com/fommil/spray-json-shapeless/pull/30.patch","issue_url":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/30","number":30,"state":"open","locked":false,"title":"Add support for 'extensible record' types","user":{"login":"danslapman","id":1708325,"avatar_url":"https://avatars.githubusercontent.com/u/1708325?v=3","gravatar_id":"","url":"https://api.github.com/users/danslapman","html_url":"https://github.com/danslapman","followers_url":"https://api.github.com/users/danslapman/followers","following_url":"https://api.github.com/users/danslapman/following{/other_user}","gists_url":"https://api.github.com/users/danslapman/gists{/gist_id}","starred_url":"https://api.github.com/users/danslapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danslapman/subscriptions","organizations_url":"https://api.github.com/users/danslapman/orgs","repos_url":"https://api.github.com/users/danslapman/repos","events_url":"https://api.github.com/users/danslapman/events{/privacy}","received_events_url":"https://api.github.com/users/danslapman/received_events","type":"User","site_admin":false},"body":"This PR adds support for `extensible record` types as requested in #28","created_at":"2016-12-07T22:24:04Z","updated_at":"2016-12-07T22:53:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5bb7f0497cdaa000f59a7692dc52ec004e2389cc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30/commits","review_comments_url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30/comments","review_comment_url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/30/comments","statuses_url":"https://api.github.com/repos/fommil/spray-json-shapeless/statuses/2aa40c14f9d0e6d896b075489fc70ab1575e4d9b","head":{"label":"danslapman:master","ref":"master","sha":"2aa40c14f9d0e6d896b075489fc70ab1575e4d9b","user":{"login":"danslapman","id":1708325,"avatar_url":"https://avatars.githubusercontent.com/u/1708325?v=3","gravatar_id":"","url":"https://api.github.com/users/danslapman","html_url":"https://github.com/danslapman","followers_url":"https://api.github.com/users/danslapman/followers","following_url":"https://api.github.com/users/danslapman/following{/other_user}","gists_url":"https://api.github.com/users/danslapman/gists{/gist_id}","starred_url":"https://api.github.com/users/danslapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danslapman/subscriptions","organizations_url":"https://api.github.com/users/danslapman/orgs","repos_url":"https://api.github.com/users/danslapman/repos","events_url":"https://api.github.com/users/danslapman/events{/privacy}","received_events_url":"https://api.github.com/users/danslapman/received_events","type":"User","site_admin":false},"repo":{"id":75876050,"name":"spray-json-shapeless","full_name":"danslapman/spray-json-shapeless","owner":{"login":"danslapman","id":1708325,"avatar_url":"https://avatars.githubusercontent.com/u/1708325?v=3","gravatar_id":"","url":"https://api.github.com/users/danslapman","html_url":"https://github.com/danslapman","followers_url":"https://api.github.com/users/danslapman/followers","following_url":"https://api.github.com/users/danslapman/following{/other_user}","gists_url":"https://api.github.com/users/danslapman/gists{/gist_id}","starred_url":"https://api.github.com/users/danslapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danslapman/subscriptions","organizations_url":"https://api.github.com/users/danslapman/orgs","repos_url":"https://api.github.com/users/danslapman/repos","events_url":"https://api.github.com/users/danslapman/events{/privacy}","received_events_url":"https://api.github.com/users/danslapman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danslapman/spray-json-shapeless","description":":sparkles: Shapeless JsonFormats for spray-json","fork":true,"url":"https://api.github.com/repos/danslapman/spray-json-shapeless","forks_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/forks","keys_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/teams","hooks_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/hooks","issue_events_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/issues/events{/number}","events_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/events","assignees_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/assignees{/user}","branches_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/branches{/branch}","tags_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/tags","blobs_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/git/refs{/sha}","trees_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/statuses/{sha}","languages_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/languages","stargazers_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/stargazers","contributors_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/contributors","subscribers_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/subscribers","subscription_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/subscription","commits_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/commits{/sha}","git_commits_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/git/commits{/sha}","comments_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/comments{/number}","issue_comment_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/issues/comments{/number}","contents_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/contents/{+path}","compare_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/merges","archive_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/downloads","issues_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/issues{/number}","pulls_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/pulls{/number}","milestones_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/milestones{/number}","notifications_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/labels{/name}","releases_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/releases{/id}","deployments_url":"https://api.github.com/repos/danslapman/spray-json-shapeless/deployments","created_at":"2016-12-07T21:12:01Z","updated_at":"2016-12-07T21:12:03Z","pushed_at":"2016-12-07T22:21:58Z","git_url":"git://github.com/danslapman/spray-json-shapeless.git","ssh_url":"git@github.com:danslapman/spray-json-shapeless.git","clone_url":"https://github.com/danslapman/spray-json-shapeless.git","svn_url":"https://github.com/danslapman/spray-json-shapeless","homepage":"","size":3386,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fommil:master","ref":"master","sha":"ec9af4be4cd2d738292e670432458f7cca369ab2","user":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"repo":{"id":38211295,"name":"spray-json-shapeless","full_name":"fommil/spray-json-shapeless","owner":{"login":"fommil","id":1914041,"avatar_url":"https://avatars.githubusercontent.com/u/1914041?v=3","gravatar_id":"","url":"https://api.github.com/users/fommil","html_url":"https://github.com/fommil","followers_url":"https://api.github.com/users/fommil/followers","following_url":"https://api.github.com/users/fommil/following{/other_user}","gists_url":"https://api.github.com/users/fommil/gists{/gist_id}","starred_url":"https://api.github.com/users/fommil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fommil/subscriptions","organizations_url":"https://api.github.com/users/fommil/orgs","repos_url":"https://api.github.com/users/fommil/repos","events_url":"https://api.github.com/users/fommil/events{/privacy}","received_events_url":"https://api.github.com/users/fommil/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fommil/spray-json-shapeless","description":":sparkles: Shapeless JsonFormats for spray-json","fork":false,"url":"https://api.github.com/repos/fommil/spray-json-shapeless","forks_url":"https://api.github.com/repos/fommil/spray-json-shapeless/forks","keys_url":"https://api.github.com/repos/fommil/spray-json-shapeless/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fommil/spray-json-shapeless/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fommil/spray-json-shapeless/teams","hooks_url":"https://api.github.com/repos/fommil/spray-json-shapeless/hooks","issue_events_url":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/events{/number}","events_url":"https://api.github.com/repos/fommil/spray-json-shapeless/events","assignees_url":"https://api.github.com/repos/fommil/spray-json-shapeless/assignees{/user}","branches_url":"https://api.github.com/repos/fommil/spray-json-shapeless/branches{/branch}","tags_url":"https://api.github.com/repos/fommil/spray-json-shapeless/tags","blobs_url":"https://api.github.com/repos/fommil/spray-json-shapeless/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fommil/spray-json-shapeless/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fommil/spray-json-shapeless/git/refs{/sha}","trees_url":"https://api.github.com/repos/fommil/spray-json-shapeless/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fommil/spray-json-shapeless/statuses/{sha}","languages_url":"https://api.github.com/repos/fommil/spray-json-shapeless/languages","stargazers_url":"https://api.github.com/repos/fommil/spray-json-shapeless/stargazers","contributors_url":"https://api.github.com/repos/fommil/spray-json-shapeless/contributors","subscribers_url":"https://api.github.com/repos/fommil/spray-json-shapeless/subscribers","subscription_url":"https://api.github.com/repos/fommil/spray-json-shapeless/subscription","commits_url":"https://api.github.com/repos/fommil/spray-json-shapeless/commits{/sha}","git_commits_url":"https://api.github.com/repos/fommil/spray-json-shapeless/git/commits{/sha}","comments_url":"https://api.github.com/repos/fommil/spray-json-shapeless/comments{/number}","issue_comment_url":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/comments{/number}","contents_url":"https://api.github.com/repos/fommil/spray-json-shapeless/contents/{+path}","compare_url":"https://api.github.com/repos/fommil/spray-json-shapeless/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fommil/spray-json-shapeless/merges","archive_url":"https://api.github.com/repos/fommil/spray-json-shapeless/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fommil/spray-json-shapeless/downloads","issues_url":"https://api.github.com/repos/fommil/spray-json-shapeless/issues{/number}","pulls_url":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls{/number}","milestones_url":"https://api.github.com/repos/fommil/spray-json-shapeless/milestones{/number}","notifications_url":"https://api.github.com/repos/fommil/spray-json-shapeless/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fommil/spray-json-shapeless/labels{/name}","releases_url":"https://api.github.com/repos/fommil/spray-json-shapeless/releases{/id}","deployments_url":"https://api.github.com/repos/fommil/spray-json-shapeless/deployments","created_at":"2015-06-28T19:30:03Z","updated_at":"2016-10-27T22:25:55Z","pushed_at":"2016-12-07T22:24:04Z","git_url":"git://github.com/fommil/spray-json-shapeless.git","ssh_url":"git@github.com:fommil/spray-json-shapeless.git","clone_url":"https://github.com/fommil/spray-json-shapeless.git","svn_url":"https://github.com/fommil/spray-json-shapeless","homepage":"","size":3386,"stargazers_count":82,"watchers_count":82,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":6,"forks":10,"open_issues":6,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30"},"html":{"href":"https://github.com/fommil/spray-json-shapeless/pull/30"},"issue":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/30"},"comments":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/fommil/spray-json-shapeless/statuses/2aa40c14f9d0e6d896b075489fc70ab1575e4d9b"}}}}
{"actor":{"display_login":"danslapman"}}