title: How can I have JsonFormat accept more than one pattern?
body: <p>I have a variable <code>effectiveDate</code> that is an API parameter:</p>
  
  <pre><code>@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = DATE_OR_DATE_AND_TIME_FORMAT)
  @ApiModelProperty(value = "effectiveDate")
  private Date effectiveDate = null;
  </code></pre>
  
  <p>The current value of <code>DATE_OR_DATE_AND_TIME_FORMAT</code> is <code>"yyyy-MM-dd HH:mm:ss"</code>. But I need to be able to accept <code>"yyyy-MM-dd HH:mm:ss"</code> OR <code>"yyyy-MM-dd"</code>. I was doing this with a Regex pattern before, because this was a String, not a Date, but it can no longer be a string and must be a Date. Is there a way to make <code>pattern</code> have several values, or something like an <code>or</code> statement in a pattern?</p>