{"action":"closed","issue":{"url":"https://api.github.com/repos/OrbitzWorldwide/consul-client/issues/40","labels_url":"https://api.github.com/repos/OrbitzWorldwide/consul-client/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/OrbitzWorldwide/consul-client/issues/40/comments","events_url":"https://api.github.com/repos/OrbitzWorldwide/consul-client/issues/40/events","html_url":"https://github.com/OrbitzWorldwide/consul-client/issues/40","id":97277118,"number":40,"title":"Serialization Discrepancy in SessionInfo","user":{"login":"bearrito","id":1908139,"avatar_url":"https://avatars.githubusercontent.com/u/1908139?v=3","gravatar_id":"","url":"https://api.github.com/users/bearrito","html_url":"https://github.com/bearrito","followers_url":"https://api.github.com/users/bearrito/followers","following_url":"https://api.github.com/users/bearrito/following{/other_user}","gists_url":"https://api.github.com/users/bearrito/gists{/gist_id}","starred_url":"https://api.github.com/users/bearrito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bearrito/subscriptions","organizations_url":"https://api.github.com/users/bearrito/orgs","repos_url":"https://api.github.com/users/bearrito/repos","events_url":"https://api.github.com/users/bearrito/events{/privacy}","received_events_url":"https://api.github.com/users/bearrito/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-26T02:34:27Z","updated_at":"2015-07-26T23:46:33Z","closed_at":"2015-07-26T23:46:33Z","body":"**Serialization**\r\nThe SessionInfo seems unable to parse SessionInfo with non-null TTL\r\n\r\nThe below json fails to post using  sessionClient.createSession\r\n```\r\n{\"Name\":\"service-1\",\"TTL\":\"600\"}\r\n```\r\n\r\nThe below json works using  sessionClient.createSession (addition of s to TTL)\r\n```\r\n{\"Name\":\"service-1\",\"TTL\":\"600s\"}\r\n```\r\n\r\nThis seems supported by the docs : https://www.consul.io/docs/agent/http/session.html#session_create\r\n\r\n**Deserialization**\r\nHowever SessionInfo TTL is a Long and and there doesn't seem to be a  serde that intercepts.\r\n\r\nIn particular the below is thrown\r\n\r\n```\r\nProblem with reading the data, class [Lcom.orbitz.consul.model.session.SessionInfo;, ContentType: application/json.\r\njavax.ws.rs.client.ResponseProcessingException: Problem with reading the data, class [Lcom.orbitz.consul.model.session.SessionInfo;, ContentType: application/json.\r\n\tat org.apache.cxf.jaxrs.impl.ResponseImpl.reportMessageHandlerProblem(ResponseImpl.java:433)\r\n\tat org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:378)\r\n\tat org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:512)\r\n....\r\n\r\nCaused by: com.fasterxml.jackson.databind.exc.InvalidFormatException: Can not construct instance of long from String value '600s': not a valid Long value\r\n at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@11ce4975; line: 1, column: 182] (through reference chain: Object[][0]->com.orbitz.consul.model.session.SessionInfo[\"TTL\"])\r\n\r\n```\r\n\r\n\r\nI'm more familiar with Spray and haven't done much with Jackson, but I can put together a PR for this if someone can confirm the issue and that it isn't an issue of my usage.\r\n"}}