{"action":"created","issue":{"url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/62","labels_url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/62/comments","events_url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/62/events","html_url":"https://github.com/thebuzzmedia/universal-binary-json/issues/62","id":53996634,"number":62,"title":"RFE: semantically identical objects that hash to identical values","user":{"login":"dwhall","id":218491,"avatar_url":"https://avatars.githubusercontent.com/u/218491?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhall","html_url":"https://github.com/dwhall","followers_url":"https://api.github.com/users/dwhall/followers","following_url":"https://api.github.com/users/dwhall/following{/other_user}","gists_url":"https://api.github.com/users/dwhall/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhall/subscriptions","organizations_url":"https://api.github.com/users/dwhall/orgs","repos_url":"https://api.github.com/users/dwhall/repos","events_url":"https://api.github.com/users/dwhall/events{/privacy}","received_events_url":"https://api.github.com/users/dwhall/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-11T16:40:16Z","updated_at":"2015-01-11T19:01:59Z","closed_at":null,"body":"As a recommended enhancement, semantically identical objects should hash to identical values.  This JSON object:\r\n\r\n    {\r\n    \"foo\": 0,\r\n    \"bar\": 1\r\n    }\r\n\r\nis semantically identical to this JSON object:\r\n\r\n    {\r\n    \"bar\": 1,\r\n    \"foo\": 0\r\n    }\r\n\r\nyet when fed into a cryptographic algorithm, they will yield differing results.  I recommend that UBJSON enforce a policy of sorting an object's key-value pairs based on they key; perhaps utf-8 sorting.  This way, semantically identical objects will always be identically represented and return identical cryptographic results."},"comment":{"url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/comments/69506177","html_url":"https://github.com/thebuzzmedia/universal-binary-json/issues/62#issuecomment-69506177","issue_url":"https://api.github.com/repos/thebuzzmedia/universal-binary-json/issues/62","id":69506177,"user":{"login":"kxepal","id":785983,"avatar_url":"https://avatars.githubusercontent.com/u/785983?v=3","gravatar_id":"","url":"https://api.github.com/users/kxepal","html_url":"https://github.com/kxepal","followers_url":"https://api.github.com/users/kxepal/followers","following_url":"https://api.github.com/users/kxepal/following{/other_user}","gists_url":"https://api.github.com/users/kxepal/gists{/gist_id}","starred_url":"https://api.github.com/users/kxepal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kxepal/subscriptions","organizations_url":"https://api.github.com/users/kxepal/orgs","repos_url":"https://api.github.com/users/kxepal/repos","events_url":"https://api.github.com/users/kxepal/events{/privacy}","received_events_url":"https://api.github.com/users/kxepal/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T19:01:59Z","updated_at":"2015-01-11T19:01:59Z","body":"-1 Turning objects into ordered key-value pairs doesn't makes much sense, but will make things more complicated. For instance, this kills unbounded objects feature completely. You should solve that issue at application level."}}