{"action":"created","issue":{"url":"https://api.github.com/repos/json-api/json-api/issues/574","labels_url":"https://api.github.com/repos/json-api/json-api/issues/574/labels{/name}","comments_url":"https://api.github.com/repos/json-api/json-api/issues/574/comments","events_url":"https://api.github.com/repos/json-api/json-api/issues/574/events","html_url":"https://github.com/json-api/json-api/issues/574","id":70754245,"number":574,"title":"Proposal to reserve \"extensions\" member at the top level of documents/resource objects","user":{"login":"ziege","id":1983424,"avatar_url":"https://avatars.githubusercontent.com/u/1983424?v=3","gravatar_id":"","url":"https://api.github.com/users/ziege","html_url":"https://github.com/ziege","followers_url":"https://api.github.com/users/ziege/followers","following_url":"https://api.github.com/users/ziege/following{/other_user}","gists_url":"https://api.github.com/users/ziege/gists{/gist_id}","starred_url":"https://api.github.com/users/ziege/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziege/subscriptions","organizations_url":"https://api.github.com/users/ziege/orgs","repos_url":"https://api.github.com/users/ziege/repos","events_url":"https://api.github.com/users/ziege/events{/privacy}","received_events_url":"https://api.github.com/users/ziege/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/json-api/json-api/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-04-24T18:02:25Z","updated_at":"2015-11-10T08:33:26Z","closed_at":null,"body":"In addition to #573, I suggest to introduce a new top level member \"extensions\", which enables extensions to add additional data without creating conflicts (as previously described in #569).\r\n\r\nOne example:\r\n\r\nI thought about an extension to sign requests and responses, therefore I would have to add signature information to the document. To avoid conflicts (with attributes, other top level members and other extensions), every extension needs its own namespace.\r\n\r\nSo I would suggest to wrap them (following the suggested structure in #573) like in the following example (example name of the extension is \"signature\"):\r\n\r\n```\r\n{\r\n  \"id\": \"1\",\r\n  \"type\": \"person\",\r\n  \"attributes\": {\r\n    \"firstname\": \"Justin\",\r\n    \"lastname\": \"Timberlake\",\r\n    \"signature\": \"http://commons.wikimedia.org/wiki/File:Justin_Timberlake_signature.svg\",\r\n  },\r\n  \"extensions\": {\r\n    \"signature\": {\r\n      \"value\": \"...\",\r\n      \"algorithm\" : \"...\",\r\n      \"canonicalization\": \"...\",\r\n      \"key\": \"...\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nAs you can see, \"signature\" is defined as an attribute. The extension also uses this a member of this name, but the namespace prevents a conflict.\r\n\r\nPlease note: \r\n\r\nThis is just a simplified example. An extension as described above would normally add data at the document level (to sign the whole document), not at the resource object level - but other extensions could add resource object specific data. So I request to add this member to both."},"comment":{"url":"https://api.github.com/repos/json-api/json-api/issues/comments/155357768","html_url":"https://github.com/json-api/json-api/issues/574#issuecomment-155357768","issue_url":"https://api.github.com/repos/json-api/json-api/issues/574","id":155357768,"user":{"login":"ethanresnick","id":471894,"avatar_url":"https://avatars.githubusercontent.com/u/471894?v=3","gravatar_id":"","url":"https://api.github.com/users/ethanresnick","html_url":"https://github.com/ethanresnick","followers_url":"https://api.github.com/users/ethanresnick/followers","following_url":"https://api.github.com/users/ethanresnick/following{/other_user}","gists_url":"https://api.github.com/users/ethanresnick/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanresnick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanresnick/subscriptions","organizations_url":"https://api.github.com/users/ethanresnick/orgs","repos_url":"https://api.github.com/users/ethanresnick/repos","events_url":"https://api.github.com/users/ethanresnick/events{/privacy}","received_events_url":"https://api.github.com/users/ethanresnick/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T08:33:26Z","updated_at":"2015-11-10T08:33:26Z","body":"Closing this in favor of #650, which I believe has assimilated these concerns. I'm also about to open another issue (superseding #650) that takes this into account."}}