{"action":"created","issue":{"url":"https://api.github.com/repos/guardian/frontend/issues/8059","labels_url":"https://api.github.com/repos/guardian/frontend/issues/8059/labels{/name}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/8059/comments","events_url":"https://api.github.com/repos/guardian/frontend/issues/8059/events","html_url":"https://github.com/guardian/frontend/pull/8059","id":55790277,"number":8059,"title":"Proper JSON for facia-tool archiving","user":{"login":"janua","id":445472,"avatar_url":"https://avatars.githubusercontent.com/u/445472?v=3","gravatar_id":"","url":"https://api.github.com/users/janua","html_url":"https://github.com/janua","followers_url":"https://api.github.com/users/janua/followers","following_url":"https://api.github.com/users/janua/following{/other_user}","gists_url":"https://api.github.com/users/janua/gists{/gist_id}","starred_url":"https://api.github.com/users/janua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janua/subscriptions","organizations_url":"https://api.github.com/users/janua/orgs","repos_url":"https://api.github.com/users/janua/repos","events_url":"https://api.github.com/users/janua/events{/privacy}","received_events_url":"https://api.github.com/users/janua/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-28T17:48:40Z","updated_at":"2015-01-29T11:32:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/8059","html_url":"https://github.com/guardian/frontend/pull/8059","diff_url":"https://github.com/guardian/frontend/pull/8059.diff","patch_url":"https://github.com/guardian/frontend/pull/8059.patch"},"body":"After #8015, the `Json` was being put into `Dynamo` as a weird escaped string. This fixes that, and puts it into the DB as proper `dyanmo` `json`.\r\n\r\nThis adds conversions from `JsValue` to `AttributeValue` that is accepted by `PutItemRequest` via the `JsValue` catamorphism. I opted for using implicit classes instead of using the strange `Read` syntax.\r\n\r\nI had to bump the version of `aws-java-sdk` in order to get methods such as `withM` and `withL`.\r\n\r\n#### Sidenote: Json and Aws-java-sdk\r\nIt is really unfortunate that you can't easily put `Json` into `Dynamo` in an `asynchronous` manner. \r\n`Item` from the bumped version supports `fromJSON(s: String)`, but it is useless as the `AmazonDynamoDbAsyncClient` can't handle `Item`s. The only way to use `Item`s directly is to get a `Table` instance and then use `putItem` with that which seems to be completely blocking.\r\n\r\nWhat's worse is that `PutItemSpec` supports adding `Item`s, but when you use `getRequest()` on it, you get back a `PutItemRequest` with the internal `items` set to `null`. So basically, it's useless.\r\n\r\n@robertberry \r\n"},"comment":{"url":"https://api.github.com/repos/guardian/frontend/issues/comments/72010168","html_url":"https://github.com/guardian/frontend/pull/8059#issuecomment-72010168","issue_url":"https://api.github.com/repos/guardian/frontend/issues/8059","id":72010168,"user":{"login":"janua","id":445472,"avatar_url":"https://avatars.githubusercontent.com/u/445472?v=3","gravatar_id":"","url":"https://api.github.com/users/janua","html_url":"https://github.com/janua","followers_url":"https://api.github.com/users/janua/followers","following_url":"https://api.github.com/users/janua/following{/other_user}","gists_url":"https://api.github.com/users/janua/gists{/gist_id}","starred_url":"https://api.github.com/users/janua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janua/subscriptions","organizations_url":"https://api.github.com/users/janua/orgs","repos_url":"https://api.github.com/users/janua/repos","events_url":"https://api.github.com/users/janua/events{/privacy}","received_events_url":"https://api.github.com/users/janua/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T11:32:09Z","updated_at":"2015-01-29T11:32:09Z","body":"Yeah, it's bad. Something doesn't seem right with the `aws-java-sdk` at times; in this instance is has two abstractions that are sort of the same but don't operate with each other.\r\n\r\nNeeds to be a lovely scala lib for it!"}}