{"action":"opened","issue":{"url":"https://api.github.com/repos/owlike/genson/issues/138","repository_url":"https://api.github.com/repos/owlike/genson","labels_url":"https://api.github.com/repos/owlike/genson/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/owlike/genson/issues/138/comments","events_url":"https://api.github.com/repos/owlike/genson/issues/138/events","html_url":"https://github.com/owlike/genson/issues/138","id":332241329,"node_id":"MDU6SXNzdWUzMzIyNDEzMjk=","number":138,"title":"Unable to round-trip Enums within Map.","user":{"login":"rlubke","id":459724,"node_id":"MDQ6VXNlcjQ1OTcyNA==","avatar_url":"https://avatars0.githubusercontent.com/u/459724?v=4","gravatar_id":"","url":"https://api.github.com/users/rlubke","html_url":"https://github.com/rlubke","followers_url":"https://api.github.com/users/rlubke/followers","following_url":"https://api.github.com/users/rlubke/following{/other_user}","gists_url":"https://api.github.com/users/rlubke/gists{/gist_id}","starred_url":"https://api.github.com/users/rlubke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlubke/subscriptions","organizations_url":"https://api.github.com/users/rlubke/orgs","repos_url":"https://api.github.com/users/rlubke/repos","events_url":"https://api.github.com/users/rlubke/events{/privacy}","received_events_url":"https://api.github.com/users/rlubke/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-14T03:42:34Z","updated_at":"2018-06-14T03:42:34Z","closed_at":null,"author_association":"NONE","body":"Consider the following:\r\n\r\n```java\r\n@Test\r\n  public void testDeserializationOfEnumInMap() {\r\n    Genson genson = new GensonBuilder().useClassMetadata(true).create();\r\n    Map<String, Object> expected = new LinkedHashMap<>();\r\n    expected.put(\"minutes\", TimeUnit.MINUTES);\r\n    expected.put(\"seconds\", TimeUnit.SECONDS);\r\n    Map result = genson.deserialize(genson.serialize(expected), LinkedHashMap.class);\r\n    assertEquals(expected, result);\r\n  }\r\n```\r\n\r\nThe equality failure is due to the value within the deserialized result is String vs TimeUnit.\r\n\r\n"}}
{"actor":{"display_login":"rlubke"}}