{"action":"created","issue":{"url":"https://api.github.com/repos/edsu/pymarc/issues/81","labels_url":"https://api.github.com/repos/edsu/pymarc/issues/81/labels{/name}","comments_url":"https://api.github.com/repos/edsu/pymarc/issues/81/comments","events_url":"https://api.github.com/repos/edsu/pymarc/issues/81/events","html_url":"https://github.com/edsu/pymarc/pull/81","id":105075717,"number":81,"title":"Fix for issue #76","user":{"login":"jimnicholls","id":1569633,"avatar_url":"https://avatars.githubusercontent.com/u/1569633?v=3","gravatar_id":"","url":"https://api.github.com/users/jimnicholls","html_url":"https://github.com/jimnicholls","followers_url":"https://api.github.com/users/jimnicholls/followers","following_url":"https://api.github.com/users/jimnicholls/following{/other_user}","gists_url":"https://api.github.com/users/jimnicholls/gists{/gist_id}","starred_url":"https://api.github.com/users/jimnicholls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimnicholls/subscriptions","organizations_url":"https://api.github.com/users/jimnicholls/orgs","repos_url":"https://api.github.com/users/jimnicholls/repos","events_url":"https://api.github.com/users/jimnicholls/events{/privacy}","received_events_url":"https://api.github.com/users/jimnicholls/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-09-06T06:51:11Z","updated_at":"2015-09-07T21:57:55Z","closed_at":"2015-09-07T13:44:43Z","pull_request":{"url":"https://api.github.com/repos/edsu/pymarc/pulls/81","html_url":"https://github.com/edsu/pymarc/pull/81","diff_url":"https://github.com/edsu/pymarc/pull/81.diff","patch_url":"https://github.com/edsu/pymarc/pull/81.patch"},"body":"As per issue #76, added JSONWriter, TextWriter and XMLWriter.\r\n\r\nJSONWriter and XMLWriter *require* that close() be called in order to close off the JSON array and XML collection element respectively. Because of this, electing to not call close() when using StringIO or BytesIO is not an option.\r\n\r\nTo support using StringIO and BytesIO, I added an optional `own_file_handle` keyword argument to `__init__` of the writers. When `own_file_handle` is True (the default), calling close() on a writer will also close the file handle. When `own_file_handle` is false, calling close() only closes off the writer and not also the file handle.\r\n\r\nThe previously documented technique of not calling close() on a MARCWriter when using StringIO still works.\r\n\r\nThe is some inconsistency with these writers when used with Python 3. MARCWriter and XMLWriter write binary bytes, JSONWriter and TextWriter write unicode characters."},"comment":{"url":"https://api.github.com/repos/edsu/pymarc/issues/comments/138383570","html_url":"https://github.com/edsu/pymarc/pull/81#issuecomment-138383570","issue_url":"https://api.github.com/repos/edsu/pymarc/issues/81","id":138383570,"user":{"login":"edsu","id":33829,"avatar_url":"https://avatars.githubusercontent.com/u/33829?v=3","gravatar_id":"","url":"https://api.github.com/users/edsu","html_url":"https://github.com/edsu","followers_url":"https://api.github.com/users/edsu/followers","following_url":"https://api.github.com/users/edsu/following{/other_user}","gists_url":"https://api.github.com/users/edsu/gists{/gist_id}","starred_url":"https://api.github.com/users/edsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edsu/subscriptions","organizations_url":"https://api.github.com/users/edsu/orgs","repos_url":"https://api.github.com/users/edsu/repos","events_url":"https://api.github.com/users/edsu/events{/privacy}","received_events_url":"https://api.github.com/users/edsu/received_events","type":"User","site_admin":false},"created_at":"2015-09-07T21:57:55Z","updated_at":"2015-09-07T21:57:55Z","body":"haha, no it's not too late -- sorry I thought I saw it was committed! Let me know when I can merge it in and I'll send out an update."}}