{"action":"created","issue":{"url":"https://api.github.com/repos/bos/aeson/issues/396","repository_url":"https://api.github.com/repos/bos/aeson","labels_url":"https://api.github.com/repos/bos/aeson/issues/396/labels{/name}","comments_url":"https://api.github.com/repos/bos/aeson/issues/396/comments","events_url":"https://api.github.com/repos/bos/aeson/issues/396/events","html_url":"https://github.com/bos/aeson/pull/396","id":154865157,"number":396,"title":"use mconcat and intersperse to avoid extra commas. Fixes #387","user":{"login":"Tritlo","id":1667287,"avatar_url":"https://avatars.githubusercontent.com/u/1667287?v=3","gravatar_id":"","url":"https://api.github.com/users/Tritlo","html_url":"https://github.com/Tritlo","followers_url":"https://api.github.com/users/Tritlo/followers","following_url":"https://api.github.com/users/Tritlo/following{/other_user}","gists_url":"https://api.github.com/users/Tritlo/gists{/gist_id}","starred_url":"https://api.github.com/users/Tritlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tritlo/subscriptions","organizations_url":"https://api.github.com/users/Tritlo/orgs","repos_url":"https://api.github.com/users/Tritlo/repos","events_url":"https://api.github.com/users/Tritlo/events{/privacy}","received_events_url":"https://api.github.com/users/Tritlo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-14T17:13:41Z","updated_at":"2016-05-14T17:52:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bos/aeson/pulls/396","html_url":"https://github.com/bos/aeson/pull/396","diff_url":"https://github.com/bos/aeson/pull/396.diff","patch_url":"https://github.com/bos/aeson/pull/396.patch"},"body":"This is a fix for #387. When an item is nothing, the result of encoding it is empty, but the concatenation code does not take this into account. This uses intersperse and mconcat for the desired behaviour. I am not sure about the performance characteristics of the way to filter out the empty values, and would love some input. Possible improvement is using `toLazyByteStringWith` from `Data.ByteString.Builder.Extra`, though I am unsure of the internals of `ByteString`. It seems as though there should be an easy way to check if a `Builder` has only the `empty` bytestring, though I did not find it.\r\n\r\nEdit: I hadn't seen #394 when I created this, since it's not linked on #387 for some reason. That fixes #387 specifically, but not my issue, i.e. that there are extra commas added for empty field."},"comment":{"url":"https://api.github.com/repos/bos/aeson/issues/comments/219233953","html_url":"https://github.com/bos/aeson/pull/396#issuecomment-219233953","issue_url":"https://api.github.com/repos/bos/aeson/issues/396","id":219233953,"user":{"login":"Tritlo","id":1667287,"avatar_url":"https://avatars.githubusercontent.com/u/1667287?v=3","gravatar_id":"","url":"https://api.github.com/users/Tritlo","html_url":"https://github.com/Tritlo","followers_url":"https://api.github.com/users/Tritlo/followers","following_url":"https://api.github.com/users/Tritlo/following{/other_user}","gists_url":"https://api.github.com/users/Tritlo/gists{/gist_id}","starred_url":"https://api.github.com/users/Tritlo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tritlo/subscriptions","organizations_url":"https://api.github.com/users/Tritlo/orgs","repos_url":"https://api.github.com/users/Tritlo/repos","events_url":"https://api.github.com/users/Tritlo/events{/privacy}","received_events_url":"https://api.github.com/users/Tritlo/received_events","type":"User","site_admin":false},"created_at":"2016-05-14T17:52:20Z","updated_at":"2016-05-14T17:52:20Z","body":"The build seems to be failing due to some cabal configure issue? And only on ghc 8?"}}