title: How do I map a List<String> from JSON to JPA
body: <p>I have a List that I want to store in the DB as a JSON string array. I've tried various ways of doing it but just can't get it working.</p>
  <p>The column is currently defined as:</p>
  <pre><code>@Column(columnDefinition = &quot;NVARCHAR(4000)&quot;)
  @ElementCollection(targetClass = String.class)
  @Convert(converter = StringListConverter.class)
  protected List&lt;String&gt; tagsT = new ArrayList&lt;&gt;();
  </code></pre>
  <p>When I try build this I get a mapping exception of &quot;Could not determine type for: java.util.List&quot;.</p>
  <p>Alternatively I've also tried defining the column as:</p>
  <pre><code>@Convert(converter = StringListConverter.class)
  protected ArrayList&lt;String&gt; tagsT = new ArrayList&lt;&gt;();
  </code></pre>
  <p>This builds successfully, however it generates a varbinary column which is not what I'm looking for. If I manually change the column to a NVARCHAR(4000) or a VARCHAR(255) then the data written still doesn't make sense.</p>
  <p>I've also tried:</p>
  <pre><code>@Column(columnDefinition = &quot;NVARCHAR(4000)&quot;)
  @ElementCollection(targetClass = String.class)
  @Convert(converter = StringListConverter.class)
  protected ArrayList&lt;String&gt; tagsT = new ArrayList&lt;&gt;();
  </code></pre>
  <p>But got the same results as previously.</p>
  <p>Any help would be appreciated as to what I'm doing wrong/missing.</p>
  <p>Thanks.</p>