{"action":"created","issue":{"url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/31","labels_url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/31/comments","events_url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/31/events","html_url":"https://github.com/ryantrinkle/reflex-dom/pull/31","id":113584498,"number":31,"title":"Add `postJson` – WIP","user":{"login":"paldepind","id":521604,"avatar_url":"https://avatars.githubusercontent.com/u/521604?v=3","gravatar_id":"","url":"https://api.github.com/users/paldepind","html_url":"https://github.com/paldepind","followers_url":"https://api.github.com/users/paldepind/followers","following_url":"https://api.github.com/users/paldepind/following{/other_user}","gists_url":"https://api.github.com/users/paldepind/gists{/gist_id}","starred_url":"https://api.github.com/users/paldepind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paldepind/subscriptions","organizations_url":"https://api.github.com/users/paldepind/orgs","repos_url":"https://api.github.com/users/paldepind/repos","events_url":"https://api.github.com/users/paldepind/events{/privacy}","received_events_url":"https://api.github.com/users/paldepind/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-27T13:34:10Z","updated_at":"2015-10-27T14:14:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ryantrinkle/reflex-dom/pulls/31","html_url":"https://github.com/ryantrinkle/reflex-dom/pull/31","diff_url":"https://github.com/ryantrinkle/reflex-dom/pull/31.diff","patch_url":"https://github.com/ryantrinkle/reflex-dom/pull/31.patch"},"body":"This adds a function to create an `XhrRequest` out of an url and a value that can be converted to JSON.\r\n\r\nThis doesn't work yet though. Aeson only supports encoding to `ByteString` and there seems to be no good way to convert a `ByteString` to a `String`. I could only find `show` and `unpack` from Data.ByteString.Char8 which truncates characters to 8 bits.\r\n\r\nMaybe there's a function I'm missing or maybe reflex-dom should use `ByteString` for the body instead of `String`."},"comment":{"url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/comments/151509095","html_url":"https://github.com/ryantrinkle/reflex-dom/pull/31#issuecomment-151509095","issue_url":"https://api.github.com/repos/ryantrinkle/reflex-dom/issues/31","id":151509095,"user":{"login":"paldepind","id":521604,"avatar_url":"https://avatars.githubusercontent.com/u/521604?v=3","gravatar_id":"","url":"https://api.github.com/users/paldepind","html_url":"https://github.com/paldepind","followers_url":"https://api.github.com/users/paldepind/followers","following_url":"https://api.github.com/users/paldepind/following{/other_user}","gists_url":"https://api.github.com/users/paldepind/gists{/gist_id}","starred_url":"https://api.github.com/users/paldepind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paldepind/subscriptions","organizations_url":"https://api.github.com/users/paldepind/orgs","repos_url":"https://api.github.com/users/paldepind/repos","events_url":"https://api.github.com/users/paldepind/events{/privacy}","received_events_url":"https://api.github.com/users/paldepind/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T14:14:55Z","updated_at":"2015-10-27T14:14:55Z","body":"> Is show the right function to use here?\r\n\r\nCertainly not. That's what was trying to get at in my comment.\r\n\r\n> I believe the correct way to do this conversion is:\r\n\r\nThat will convert first from lazy `ByteString` to strict `ByteString` to `Text` to `String`? It doesn't sound very efficient. I've found a [Reddit thread](https://www.reddit.com/r/haskell/comments/324vrx/aeson_the_tutorial_which_actually_tries_to/cq8c59i) where the author of Aeson says that people shouldn't be converting JSON to `String`."}}