{"action":"created","comment":{"url":"https://api.github.com/repos/docker/distribution/pulls/comments/26054609","id":26054609,"diff_hunk":"@@ -0,0 +1,76 @@\n+# Docker Distribution JSON Canonicalization\n+\n+## Introduction\n+\n+To provide consistent content hashing of JSON objects throughout Docker\n+Distribution APIs, a canonical JSON format has been defined. Adopting such a\n+canonicalization also aids in caching JSON responses.\n+\n+## Rules\n+\n+Compliant JSON should conform to the following rules:\n+\n+1. All generated JSON should comply with [RFC\n+   7159](http://www.ietf.org/rfc/rfc7159.txt).\n+2. Resulting \"JSON text\" shall always be encoded in UTF-8.\n+3. Unless a canonical key order is defined for a particular schema, object","path":"doc/spec/json.md","position":16,"original_position":16,"commit_id":"f6c420b43f77364aa9b23e0fadfc8d34214ff814","original_commit_id":"f6c420b43f77364aa9b23e0fadfc8d34214ff814","user":{"login":"endophage","id":1302091,"avatar_url":"https://avatars.githubusercontent.com/u/1302091?v=3","gravatar_id":"","url":"https://api.github.com/users/endophage","html_url":"https://github.com/endophage","followers_url":"https://api.github.com/users/endophage/followers","following_url":"https://api.github.com/users/endophage/following{/other_user}","gists_url":"https://api.github.com/users/endophage/gists{/gist_id}","starred_url":"https://api.github.com/users/endophage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/endophage/subscriptions","organizations_url":"https://api.github.com/users/endophage/orgs","repos_url":"https://api.github.com/users/endophage/repos","events_url":"https://api.github.com/users/endophage/events{/privacy}","received_events_url":"https://api.github.com/users/endophage/received_events","type":"User","site_admin":false},"body":"Legacy code or working with libraries that already generate JSON in a specific order (like TUF, which seems to have a consistent, non-lexical ordering).","created_at":"2015-03-09T17:09:43Z","updated_at":"2015-03-09T17:09:43Z","html_url":"https://github.com/docker/distribution/pull/226#discussion_r26054609","pull_request_url":"https://api.github.com/repos/docker/distribution/pulls/226","_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments/26054609"},"html":{"href":"https://github.com/docker/distribution/pull/226#discussion_r26054609"},"pull_request":{"href":"https://api.github.com/repos/docker/distribution/pulls/226"}}},"pull_request":{"url":"https://api.github.com/repos/docker/distribution/pulls/226","id":30350365,"html_url":"https://github.com/docker/distribution/pull/226","diff_url":"https://github.com/docker/distribution/pull/226.diff","patch_url":"https://github.com/docker/distribution/pull/226.patch","issue_url":"https://api.github.com/repos/docker/distribution/issues/226","number":226,"state":"open","locked":false,"title":"doc/spec: canonicalized JSON format for distribution APIs","user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"body":"Signed-off-by: Stephen J Day <stephen.day@docker.com>\r\n\r\nCloses #205.","created_at":"2015-03-03T06:48:05Z","updated_at":"2015-03-09T17:09:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"328e09f8601e270a994405d3e5e4493d85697c79","assignee":null,"milestone":{"url":"https://api.github.com/repos/docker/distribution/milestones/3","html_url":"https://github.com/docker/distribution/milestones/Registry/RC","labels_url":"https://api.github.com/repos/docker/distribution/milestones/3/labels","id":924559,"number":3,"title":"Registry/RC","description":"Issues that are part of the first release candidate.","creator":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":6,"state":"open","created_at":"2015-01-06T22:00:58Z","updated_at":"2015-03-06T05:38:18Z","due_on":"2015-03-19T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/docker/distribution/pulls/226/commits","review_comments_url":"https://api.github.com/repos/docker/distribution/pulls/226/comments","review_comment_url":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/docker/distribution/issues/226/comments","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/f6c420b43f77364aa9b23e0fadfc8d34214ff814","head":{"label":"stevvooe:json-canonicalization","ref":"json-canonicalization","sha":"f6c420b43f77364aa9b23e0fadfc8d34214ff814","user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"repo":{"id":28724012,"name":"distribution","full_name":"stevvooe/distribution","owner":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stevvooe/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":true,"url":"https://api.github.com/repos/stevvooe/distribution","forks_url":"https://api.github.com/repos/stevvooe/distribution/forks","keys_url":"https://api.github.com/repos/stevvooe/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stevvooe/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stevvooe/distribution/teams","hooks_url":"https://api.github.com/repos/stevvooe/distribution/hooks","issue_events_url":"https://api.github.com/repos/stevvooe/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/stevvooe/distribution/events","assignees_url":"https://api.github.com/repos/stevvooe/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/stevvooe/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/stevvooe/distribution/tags","blobs_url":"https://api.github.com/repos/stevvooe/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stevvooe/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stevvooe/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/stevvooe/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stevvooe/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/stevvooe/distribution/languages","stargazers_url":"https://api.github.com/repos/stevvooe/distribution/stargazers","contributors_url":"https://api.github.com/repos/stevvooe/distribution/contributors","subscribers_url":"https://api.github.com/repos/stevvooe/distribution/subscribers","subscription_url":"https://api.github.com/repos/stevvooe/distribution/subscription","commits_url":"https://api.github.com/repos/stevvooe/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/stevvooe/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/stevvooe/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/stevvooe/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/stevvooe/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/stevvooe/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stevvooe/distribution/merges","archive_url":"https://api.github.com/repos/stevvooe/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stevvooe/distribution/downloads","issues_url":"https://api.github.com/repos/stevvooe/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/stevvooe/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/stevvooe/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/stevvooe/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stevvooe/distribution/labels{/name}","releases_url":"https://api.github.com/repos/stevvooe/distribution/releases{/id}","created_at":"2015-01-02T19:42:04Z","updated_at":"2015-03-07T00:27:32Z","pushed_at":"2015-03-07T02:52:50Z","git_url":"git://github.com/stevvooe/distribution.git","ssh_url":"git@github.com:stevvooe/distribution.git","clone_url":"https://github.com/stevvooe/distribution.git","svn_url":"https://github.com/stevvooe/distribution","homepage":null,"size":2129,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"docker:master","ref":"master","sha":"81a03041d45179593ec5e3a8eb47289fa9b640db","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":28366058,"name":"distribution","full_name":"docker/distribution","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=3","gravatar_id":"","url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/distribution","description":"The Docker toolset to pack, ship, store, and deliver content","fork":false,"url":"https://api.github.com/repos/docker/distribution","forks_url":"https://api.github.com/repos/docker/distribution/forks","keys_url":"https://api.github.com/repos/docker/distribution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/distribution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/distribution/teams","hooks_url":"https://api.github.com/repos/docker/distribution/hooks","issue_events_url":"https://api.github.com/repos/docker/distribution/issues/events{/number}","events_url":"https://api.github.com/repos/docker/distribution/events","assignees_url":"https://api.github.com/repos/docker/distribution/assignees{/user}","branches_url":"https://api.github.com/repos/docker/distribution/branches{/branch}","tags_url":"https://api.github.com/repos/docker/distribution/tags","blobs_url":"https://api.github.com/repos/docker/distribution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/distribution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/distribution/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/distribution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/distribution/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/distribution/languages","stargazers_url":"https://api.github.com/repos/docker/distribution/stargazers","contributors_url":"https://api.github.com/repos/docker/distribution/contributors","subscribers_url":"https://api.github.com/repos/docker/distribution/subscribers","subscription_url":"https://api.github.com/repos/docker/distribution/subscription","commits_url":"https://api.github.com/repos/docker/distribution/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/distribution/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/distribution/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/distribution/issues/comments{/number}","contents_url":"https://api.github.com/repos/docker/distribution/contents/{+path}","compare_url":"https://api.github.com/repos/docker/distribution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/distribution/merges","archive_url":"https://api.github.com/repos/docker/distribution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/distribution/downloads","issues_url":"https://api.github.com/repos/docker/distribution/issues{/number}","pulls_url":"https://api.github.com/repos/docker/distribution/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/distribution/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/distribution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/distribution/labels{/name}","releases_url":"https://api.github.com/repos/docker/distribution/releases{/id}","created_at":"2014-12-22T23:49:26Z","updated_at":"2015-03-08T21:58:07Z","pushed_at":"2015-03-07T02:53:56Z","git_url":"git://github.com/docker/distribution.git","ssh_url":"git@github.com:docker/distribution.git","clone_url":"https://github.com/docker/distribution.git","svn_url":"https://github.com/docker/distribution","homepage":null,"size":4017,"stargazers_count":138,"watchers_count":138,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":81,"forks":34,"open_issues":81,"watchers":138,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/distribution/pulls/226"},"html":{"href":"https://github.com/docker/distribution/pull/226"},"issue":{"href":"https://api.github.com/repos/docker/distribution/issues/226"},"comments":{"href":"https://api.github.com/repos/docker/distribution/issues/226/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/distribution/pulls/226/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/distribution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/docker/distribution/pulls/226/commits"},"statuses":{"href":"https://api.github.com/repos/docker/distribution/statuses/f6c420b43f77364aa9b23e0fadfc8d34214ff814"}}}}