{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudant/java-cloudant/issues/31","labels_url":"https://api.github.com/repos/cloudant/java-cloudant/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/cloudant/java-cloudant/issues/31/comments","events_url":"https://api.github.com/repos/cloudant/java-cloudant/issues/31/events","html_url":"https://github.com/cloudant/java-cloudant/issues/31","id":56153856,"number":31,"title":"Timestamp JSON string to Java Timestamp Value - View.query(class)","user":{"login":"rolivieri","id":6609246,"avatar_url":"https://avatars.githubusercontent.com/u/6609246?v=3","gravatar_id":"","url":"https://api.github.com/users/rolivieri","html_url":"https://github.com/rolivieri","followers_url":"https://api.github.com/users/rolivieri/followers","following_url":"https://api.github.com/users/rolivieri/following{/other_user}","gists_url":"https://api.github.com/users/rolivieri/gists{/gist_id}","starred_url":"https://api.github.com/users/rolivieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rolivieri/subscriptions","organizations_url":"https://api.github.com/users/rolivieri/orgs","repos_url":"https://api.github.com/users/rolivieri/repos","events_url":"https://api.github.com/users/rolivieri/events{/privacy}","received_events_url":"https://api.github.com/users/rolivieri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-01T06:23:33Z","updated_at":"2015-02-01T06:23:33Z","closed_at":null,"body":"Hello, I am having an issue when using the query method of the View class:\r\n\r\nList<Image> images = myView.query(Image.class);\r\n\r\nThe above method invocation results in a JSON exception: my Image class has a timestamp instance variable, and the Gson instance used internally by the couchdb library fails to translate a string like “2015-01-23T18:25:43.511Z” to a timestamp variable.\r\n\r\nIf I could somehow configure the Gson instance used internally by the couchdb library, this exception would not occur. I understand I can configure my own Gson instance in the following way to handle timestamp strings like “2015-01-23T18:25:43.511Z” correctly:\r\n\r\nGson gson = new GsonBuilder().setDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\").create();\r\n\r\nHowever, I am afraid I don’t know how to configure the Gson instance used internally by the couchdb library. Could you provide some guidance on how to address this issue? Thanks."}}