title: Jackson Mapping List of String or simple String
body: <p>I'm trying to get some Json from an API and parse them into some POJO's to work with them but i have this case where i can get for a key a simple String or an arrayList of Strings.</p>
  
  <p>The Json looks like this : </p>
  
  <pre><code>{
    "offerDisplayCategoryMapping": [
      {
        "offerKey": "EUICC_BASE_ACTIVATION_V01",
        "categoriesKeys": {
          "categoryKey": "Included"
        }
      },
      {
        "offerKey": "EUICC_BASE_ACTIVATION_V02",
        "categoriesKeys": {
          "categoryKey": "Included"
        }
      },
      {
        "offerKey": "EUICC_BASE_ACTIVATION_V03",
        "categoriesKeys": {
          "categoryKey": [
            "Option",
            "Included"
          ]
        }
      }]
  }
  </code></pre>
  
  <p>I'm using Spring Rest to get the result from the API. I created a POJO that represents <code>categoriesKeys</code> with a <code>List&lt;String&gt;</code> that defines <code>categoryKey</code> and in my <code>RestTemplate</code> I defined an <code>ObjectMapper</code> where i enabled <code>DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY</code> for the case of simple strings but this doesn't work!!</p>
  
  <p>Any suggestions?</p>