{"action":"opened","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-core/issues/303","repository_url":"https://api.github.com/repos/FasterXML/jackson-core","labels_url":"https://api.github.com/repos/FasterXML/jackson-core/issues/303/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-core/issues/303/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-core/issues/303/events","html_url":"https://github.com/FasterXML/jackson-core/issues/303","id":167342495,"number":303,"title":"inconsistent data types returned by ObjectMapper at compile time and runtime","user":{"login":"koosha--","id":2233648,"avatar_url":"https://avatars.githubusercontent.com/u/2233648?v=3","gravatar_id":"","url":"https://api.github.com/users/koosha--","html_url":"https://github.com/koosha--","followers_url":"https://api.github.com/users/koosha--/followers","following_url":"https://api.github.com/users/koosha--/following{/other_user}","gists_url":"https://api.github.com/users/koosha--/gists{/gist_id}","starred_url":"https://api.github.com/users/koosha--/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koosha--/subscriptions","organizations_url":"https://api.github.com/users/koosha--/orgs","repos_url":"https://api.github.com/users/koosha--/repos","events_url":"https://api.github.com/users/koosha--/events{/privacy}","received_events_url":"https://api.github.com/users/koosha--/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-25T11:15:15Z","updated_at":"2016-07-25T11:15:15Z","closed_at":null,"body":"I'm using the `readValue()` method of `ObjectMapper` on a JSON string to get a hash map of strings:\r\n\r\n```\r\nHashMap<String, String> jsonHash = mapper.readValue(jsonString, HashMap.class);\r\n```\r\nIn my `jsonString` variable, I have a boolean value:\r\n```\r\n{\r\n  ...\r\n  \"success\":\"true\"\r\n  ...\r\n}\r\n```\r\nThe problem is that the type of `jsonHash.get(\"success\")` is not String but Boolean at runtime while it is String at compile time. This has caused all kinds of compatibility issues and prevents me from checking its value in an `if` condition and has driven me mad.\r\n\r\nPlease let me know how I can work around this issue. And, if it is a bug (which must be), please consider fixing it.\r\n\r\nThank you."}}
{"actor":{"display_login":"koosha--"}}