{"action":"created","issue":{"url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/59","labels_url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/59/comments","events_url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/59/events","html_url":"https://github.com/FasterXML/jackson-module-afterburner/issues/59","id":108318708,"number":59,"title":"Cannot customize String deserialization behavior","user":{"login":"brianwyantora","id":11786450,"avatar_url":"https://avatars.githubusercontent.com/u/11786450?v=3","gravatar_id":"","url":"https://api.github.com/users/brianwyantora","html_url":"https://github.com/brianwyantora","followers_url":"https://api.github.com/users/brianwyantora/followers","following_url":"https://api.github.com/users/brianwyantora/following{/other_user}","gists_url":"https://api.github.com/users/brianwyantora/gists{/gist_id}","starred_url":"https://api.github.com/users/brianwyantora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianwyantora/subscriptions","organizations_url":"https://api.github.com/users/brianwyantora/orgs","repos_url":"https://api.github.com/users/brianwyantora/repos","events_url":"https://api.github.com/users/brianwyantora/events{/privacy}","received_events_url":"https://api.github.com/users/brianwyantora/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/milestones/14","html_url":"https://github.com/FasterXML/jackson-module-afterburner/milestones/2.6.3","labels_url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/milestones/14/labels","id":1332162,"number":14,"title":"2.6.3","description":null,"creator":{"login":"cowtowncoder","id":55065,"avatar_url":"https://avatars.githubusercontent.com/u/55065?v=3","gravatar_id":"","url":"https://api.github.com/users/cowtowncoder","html_url":"https://github.com/cowtowncoder","followers_url":"https://api.github.com/users/cowtowncoder/followers","following_url":"https://api.github.com/users/cowtowncoder/following{/other_user}","gists_url":"https://api.github.com/users/cowtowncoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cowtowncoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowtowncoder/subscriptions","organizations_url":"https://api.github.com/users/cowtowncoder/orgs","repos_url":"https://api.github.com/users/cowtowncoder/repos","events_url":"https://api.github.com/users/cowtowncoder/events{/privacy}","received_events_url":"https://api.github.com/users/cowtowncoder/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":2,"state":"open","created_at":"2015-09-30T21:50:09Z","updated_at":"2015-10-05T05:59:10Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-09-25T12:46:12Z","updated_at":"2015-10-05T06:00:00Z","closed_at":"2015-10-05T05:58:54Z","body":"I have a use case where we use CharacterEscapes to encode a few characters serialized with Jackson.  The other side of the coin is that we've long used a simple JsonDeserializer to unencode these same characters.  Basically, the intent being that by making an RO into JSON, then converting the JSON back into the RO, there's no changes that occur during the round trip.\r\n\r\nLet's be more specific.  I want to get the following test to pass.  Is there any way that I can accomplish this?\r\n\r\n```\r\n@Test\r\npublic void ensureSimpleROCanGetCreatedWithUnescapedJSON() throws Exception {\r\n    ObjectMapper mapper = new ObjectMapper();\r\n    SimpleModule module = // ...;\r\n    module.addDeserializer(String.class, ...);\r\n    module.addValueInstantiator(String.class, ...);\r\n    mapper.registerModule(new AfterburnerModule());\r\n    mapper.registerModule(module);\r\n\r\n    String jsonObject = \"{\\\"field\\\": \\\"value &amp; value\\\"}\";\r\n    SimpleRO parsedRO = mapper.readValue(jsonObject, SimpleRO.class);\r\n    Assert.assertEquals(\"value & value\", parsedRO.field);\r\n}\r\n\r\nprivate static class SimpleRO {\r\n    public String field;\r\n}\r\n```\r\n\r\nBoth the JsonDeserializer I have configured (implementing `public String deserialize(JsonParser parser, DeserializationContext context) throws IOException`) and the StdValueInstantiator I have configured (implementing `public Object createFromString(DeserializationContext ctxt, String value) throws IOException`) pass the strings through a method which does, basically `return Pattern.compile(\"&amp;\").matcher(string).replaceAll(\"&\");`.\r\n\r\nWithout afterburner, this test passes.  With, it fails.  Any ideas?"},"comment":{"url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/comments/145439204","html_url":"https://github.com/FasterXML/jackson-module-afterburner/issues/59#issuecomment-145439204","issue_url":"https://api.github.com/repos/FasterXML/jackson-module-afterburner/issues/59","id":145439204,"user":{"login":"cowtowncoder","id":55065,"avatar_url":"https://avatars.githubusercontent.com/u/55065?v=3","gravatar_id":"","url":"https://api.github.com/users/cowtowncoder","html_url":"https://github.com/cowtowncoder","followers_url":"https://api.github.com/users/cowtowncoder/followers","following_url":"https://api.github.com/users/cowtowncoder/following{/other_user}","gists_url":"https://api.github.com/users/cowtowncoder/gists{/gist_id}","starred_url":"https://api.github.com/users/cowtowncoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cowtowncoder/subscriptions","organizations_url":"https://api.github.com/users/cowtowncoder/orgs","repos_url":"https://api.github.com/users/cowtowncoder/repos","events_url":"https://api.github.com/users/cowtowncoder/events{/privacy}","received_events_url":"https://api.github.com/users/cowtowncoder/received_events","type":"User","site_admin":false},"created_at":"2015-10-05T06:00:00Z","updated_at":"2015-10-05T06:00:00Z","body":"Found a way to fix this; not optimal but appears to work. Also fixed a related problem for deserializers. In both cases the issue is that serializer/deserializer is associated at a later point, not during construction (unlike with direct annotations), and needs to be handled after the fact."}}