{"action":"opened","issue":{"url":"https://api.github.com/repos/matthewbauer/plugin-raw/issues/3","labels_url":"https://api.github.com/repos/matthewbauer/plugin-raw/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/matthewbauer/plugin-raw/issues/3/comments","events_url":"https://api.github.com/repos/matthewbauer/plugin-raw/issues/3/events","html_url":"https://github.com/matthewbauer/plugin-raw/issues/3","id":125688408,"number":3,"title":"Update README.md","user":{"login":"tjbenton","id":4776422,"avatar_url":"https://avatars.githubusercontent.com/u/4776422?v=3","gravatar_id":"","url":"https://api.github.com/users/tjbenton","html_url":"https://github.com/tjbenton","followers_url":"https://api.github.com/users/tjbenton/followers","following_url":"https://api.github.com/users/tjbenton/following{/other_user}","gists_url":"https://api.github.com/users/tjbenton/gists{/gist_id}","starred_url":"https://api.github.com/users/tjbenton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjbenton/subscriptions","organizations_url":"https://api.github.com/users/tjbenton/orgs","repos_url":"https://api.github.com/users/tjbenton/repos","events_url":"https://api.github.com/users/tjbenton/events{/privacy}","received_events_url":"https://api.github.com/users/tjbenton/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-08T20:34:49Z","updated_at":"2016-01-08T20:34:49Z","closed_at":null,"body":"It's not very intuitive on how you use the data that was loaded since it returns an ArrayBuffer. I would go ahead and add the following in the readme so that other people that come across this don't have to go google how to do it. There's a `TextDecoder` function that will do the same thing but it's not very well supported\r\n\r\n\r\nHere are a few utility functions to help you dealing with `ArrayBuffers`.\r\n```js\r\n// http://bit.ly/1MiLEBe\r\nfunction arrayBufferToString(buf) {\r\n  return String.fromCharCode.apply(null, new Uint8Array(buf));\r\n}\r\nfunction stringToArrayBuffer(str) {\r\n  var buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char\r\n  var bufView = new Uint8Array(buf);\r\n  for (var i=0, strLen= str.length; i &lt; strLen; i++) {\r\n    bufView[i] = str.charCodeAt(i);\r\n  }\r\n  return buf;\r\n}\r\n```"}}