title: Is it possible to perform objectmapper multiple deserializations of the same type?
body: <p>I want to change the string type using objectMapper custom deserializer in the following order.</p>
  <ol>
  <li>trim string value</li>
  <li>append other string</li>
  </ol>
  <p>Below is the code I wrote</p>
  <pre class="lang-java prettyprint-override"><code>class ApplicationTests {
  
      @Test
      fun test() {
          val objectMapper = Jackson2ObjectMapperBuilder.json()
              .modules(
                  SimpleModule().addDeserializer(String::class.java, StringTrimDeserializer()),
                  SimpleModule().addDeserializer(String::class.java, AppendStringDeserializer(&quot;hello&quot;))
              )
              .build&lt;ObjectMapper&gt;()
  
          val json = &quot;{ \&quot;key\&quot;: \&quot;value     \&quot; }&quot;.trimIndent()
  
          println(objectMapper.readValue(json, Response::class.java))
      }
  
      class StringTrimDeserializer : StringDeserializer() {
          override fun deserialize(p: JsonParser, ctxt: DeserializationContext): String {
              println(&quot;String Trim Deserializer. value=${p.valueAsString}&quot;)
              return p.valueAsString.trim()
          }
      }
  
      class AppendStringDeserializer(private val appender: String) : StringDeserializer() {
          override fun deserialize(p: JsonParser, ctxt: DeserializationContext): String {
              println(&quot;WorldString Deserializer. value=${p.valueAsString}&quot;)
              return &quot;${p.valueAsString} $appender&quot;
          }
      }
  
      data class Response(@JsonProperty(&quot;key&quot;) val key: String)
  }
  </code></pre>
  <p>I expect the result</p>
  <pre><code> StringTrimDeserializer. value=value     
   AppendStringDeserializer. value=value     
   Response(key=valuehello)
  </code></pre>
  <p>But, the result is</p>
  <pre><code> AppendStringDeserializer. value=value     
   Response(key=value      hello)
  </code></pre>
  <p>I expected StringTrimDeserializer to run, but it didn't. Can I run only one thing for the same type of deserializer?</p>