Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token
<p>I have looked for other post in stack overflow but none of them work for me. Here is the piece of code:</p>

<pre><code> public class Forward implements Serializable {
  private List&lt;String&gt; freq;
  public List&lt;String&gt; getFreq() {
    System.out.println("Print Freq::: --&gt;  " + freq);
    return freq;
  }

  public void setFreq(List&lt;String&gt; freq) {
    this.freq = freq;
 }
}
</code></pre>

<p>The JSON string is:</p>

<pre><code>{"forward":[{"freq":"78000000"}]}
</code></pre>

<p>My mapper is:</p>

<pre><code>ObjectMapper mapper = new ObjectMapper();            
mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);
String jsonString = mapper.writeValueAsString(result);
</code></pre>

<p>If I remove List freq and change to String freq it works but my JSON can contain one or more freq so I need to create a List.I get exception as:</p>

<pre><code>  Can not deserialize instance of java.util.ArrayList out of VALUE_STRING token at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream
</code></pre>