{"action":"created","issue":{"url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/13","repository_url":"https://api.github.com/repos/SalomonBrys/Kotson","labels_url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/13/comments","events_url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/13/events","html_url":"https://github.com/SalomonBrys/Kotson/issues/13","id":137675956,"number":13,"title":"Intermittently ignoring a custom type adaptor","user":{"login":"sanity","id":23075,"avatar_url":"https://avatars.githubusercontent.com/u/23075?v=3","gravatar_id":"","url":"https://api.github.com/users/sanity","html_url":"https://github.com/sanity","followers_url":"https://api.github.com/users/sanity/followers","following_url":"https://api.github.com/users/sanity/following{/other_user}","gists_url":"https://api.github.com/users/sanity/gists{/gist_id}","starred_url":"https://api.github.com/users/sanity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sanity/subscriptions","organizations_url":"https://api.github.com/users/sanity/orgs","repos_url":"https://api.github.com/users/sanity/repos","events_url":"https://api.github.com/users/sanity/events{/privacy}","received_events_url":"https://api.github.com/users/sanity/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-01T20:19:25Z","updated_at":"2016-03-24T15:53:32Z","closed_at":null,"body":"Here is my code:\r\n\r\n```\r\n    OutputStreamWriter(GZIPOutputStream(FileOutputStream(\"financials-0.0.1.json.gz\"))).use {\r\n        GsonBuilder()\r\n                .registerTypeAdapter<Instant> {\r\n                    serialize {\r\n                        it.src.epochSecond.toJson()\r\n                    }\r\n                }\r\n                .registerTypeAdapter<LocalDate> {\r\n                    serialize {\r\n                        it.src.toString().toJson()\r\n                    }\r\n                }\r\n                .create().toJson(financials, it)\r\n```\r\n\r\nFor some reason, it seems to be intermittently ignoring the Instant custom serializer and serializing an Instant field to ```{\"seconds\":1452211200,\"nanos\":0}```\r\n\r\nSorry I can't reliably reproduce it, but can you think of any reason this could occur?"},"comment":{"url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/comments/200898783","html_url":"https://github.com/SalomonBrys/Kotson/issues/13#issuecomment-200898783","issue_url":"https://api.github.com/repos/SalomonBrys/Kotson/issues/13","id":200898783,"user":{"login":"SalomonBrys","id":249857,"avatar_url":"https://avatars.githubusercontent.com/u/249857?v=3","gravatar_id":"","url":"https://api.github.com/users/SalomonBrys","html_url":"https://github.com/SalomonBrys","followers_url":"https://api.github.com/users/SalomonBrys/followers","following_url":"https://api.github.com/users/SalomonBrys/following{/other_user}","gists_url":"https://api.github.com/users/SalomonBrys/gists{/gist_id}","starred_url":"https://api.github.com/users/SalomonBrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SalomonBrys/subscriptions","organizations_url":"https://api.github.com/users/SalomonBrys/orgs","repos_url":"https://api.github.com/users/SalomonBrys/repos","events_url":"https://api.github.com/users/SalomonBrys/events{/privacy}","received_events_url":"https://api.github.com/users/SalomonBrys/received_events","type":"User","site_admin":false},"created_at":"2016-03-24T15:53:32Z","updated_at":"2016-03-24T15:53:32Z","body":"Hi,\r\nany update ?\r\nI've tried again all I could to reproduce, but couldn't..."}}