{"action":"opened","issue":{"url":"https://api.github.com/repos/Sembiance/mtgjson/issues/66","labels_url":"https://api.github.com/repos/Sembiance/mtgjson/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/Sembiance/mtgjson/issues/66/comments","events_url":"https://api.github.com/repos/Sembiance/mtgjson/issues/66/events","html_url":"https://github.com/Sembiance/mtgjson/issues/66","id":98735504,"number":66,"title":"Change 'legalities' field to an array","user":{"login":"Sembiance","id":81436,"avatar_url":"https://avatars.githubusercontent.com/u/81436?v=3","gravatar_id":"","url":"https://api.github.com/users/Sembiance","html_url":"https://github.com/Sembiance","followers_url":"https://api.github.com/users/Sembiance/followers","following_url":"https://api.github.com/users/Sembiance/following{/other_user}","gists_url":"https://api.github.com/users/Sembiance/gists{/gist_id}","starred_url":"https://api.github.com/users/Sembiance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sembiance/subscriptions","organizations_url":"https://api.github.com/users/Sembiance/orgs","repos_url":"https://api.github.com/users/Sembiance/repos","events_url":"https://api.github.com/users/Sembiance/events{/privacy}","received_events_url":"https://api.github.com/users/Sembiance/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Sembiance/mtgjson/labels/discuss","name":"discuss","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-03T12:45:19Z","updated_at":"2015-08-03T12:45:19Z","closed_at":null,"body":"The 'legalities' field right now is an object like this:\r\n\r\n```\r\n{ \"Legacy\" : \"Banned\",       \r\n\"Vintage\" : \"Restricted\",   \r\n\"Commander\" : \"Legal\" }\r\n```\r\n\r\nIt should probably be changed to an array like this:\r\n\r\n```\r\n[ { \"format\" : \"Legacy\",\r\n    \"legality\" : \"Banned\" },\r\n  { \"format\" : \"Vintage\",\r\n    \"legality\" : \"Restricted\" },\r\n  { \"format\" : \"Commander\",\r\n    \"legality\" : \"Legal\" } ]\r\n```\r\n\r\nThis would make it in line with how the 'rulings' and 'foreignNames' fields work. Additionally having predictable key names would make mapping the JSON to programming language objects/classes much easier.\r\n\r\nThis of course would break any apps/websites using this field, which is why I haven't done it yet."}}