{"action":"opened","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-jaxrs-providers/issues/96","repository_url":"https://api.github.com/repos/FasterXML/jackson-jaxrs-providers","labels_url":"https://api.github.com/repos/FasterXML/jackson-jaxrs-providers/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-jaxrs-providers/issues/96/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-jaxrs-providers/issues/96/events","html_url":"https://github.com/FasterXML/jackson-jaxrs-providers/issues/96","id":189474015,"number":96,"title":"ParamConverterProvider implementations for Date/Time classes","user":{"login":"cowwoc","id":633348,"avatar_url":"https://avatars.githubusercontent.com/u/633348?v=3","gravatar_id":"","url":"https://api.github.com/users/cowwoc","html_url":"https://github.com/cowwoc","followers_url":"https://api.github.com/users/cowwoc/followers","following_url":"https://api.github.com/users/cowwoc/following{/other_user}","gists_url":"https://api.github.com/users/cowwoc/gists{/gist_id}","starred_url":"https://api.github.com/users/cowwoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowwoc/subscriptions","organizations_url":"https://api.github.com/users/cowwoc/orgs","repos_url":"https://api.github.com/users/cowwoc/repos","events_url":"https://api.github.com/users/cowwoc/events{/privacy}","received_events_url":"https://api.github.com/users/cowwoc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-15T18:47:36Z","updated_at":"2016-11-15T18:47:36Z","closed_at":null,"body":"(Copied from https://github.com/FasterXML/jackson-modules-java8/issues/7)\r\n\r\nPlease provide `ParamConverterProvider` implementations for all date/time types that make sense to use as query parameters. For example, here is an implementation I used to pass `LocalDateTime` as a query parameter (feel free to use it):\r\n\r\n```\r\n/**\r\n * Enables LocalDateTime to be used as a QueryParam.\r\n *\r\n * @author Gili Tzabari\r\n */\r\n@Provider\r\n@Singleton\r\npublic class LocalDateTimeConverter implements ParamConverterProvider {\r\n    @Override public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations) {\r\n\r\n        if (!rawType.isAssignableFrom(LocalDateTime.class)) {\r\n            return null;\r\n        }\r\n        return new ParamConverter<T>() {\r\n            @Override\r\n            @SuppressWarnings(\"unchecked\")\r\n            public T fromString(final String value) {\r\n                if (value == null) {\r\n                    throw new IllegalArgumentException(\"value may not be null\");\r\n                }\r\n                return (T) LocalDateTime.parse(value);\r\n            }\r\n\r\n            @Override\r\n            public String toString(final T value) {\r\n                return ((LocalDateTime) value).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME);\r\n            }\r\n        };\r\n    }\r\n}\r\n```"}}
{"actor":{"display_login":"cowwoc"}}