title: Jackson 2.11.4: Set Default Value For Missing JSON field
body: <p>I have the below JSON</p>
  <pre><code>&quot;Choices&quot;: [
          {
          &quot;choiceId&quot;: &quot;1&quot;
          
      },
      {
          &quot;choiceId&quot;: &quot;2&quot;,
          &quot;choiceType&quot;: null
      }
      ]
  </code></pre>
  <p>below is the POJO and I need to have both the constructors because if there is no <code>choiceType</code> in json I need to default it to <code>Yes</code>, if  <code>choiceType</code> in json exists with <code>null</code> value then it should not default to <code>Yes</code></p>
  <pre><code>@Getter
  @ToString
  @Setter
  @NoArgsConstructor
  public class Choices {
      @JsonProperty(&quot;choiceId&quot;)
      @NonNull
      private String choiceId;
  
      @JsonProperty(&quot;choiceType&quot;)
      private String choiceType;
  
      @JsonCreator
      @JsonIgnoreProperties(ignoreUnknown = true)
      public Choices(@JsonProperty(&quot;choiceId&quot;) String choiceId) {
          this.choiceType = choiceType !=null ? choiceType : &quot;Yes&quot;;
          this.choiceId = choiceId;
      }
  
      public Choices(@JsonProperty(&quot;choiceId&quot;) String choiceId, @JsonProperty(&quot;choiceType&quot;) String choiceType) {
          this.choiceType = choiceType;
          this.choiceId = choiceId;
      }
  }
  </code></pre>
  <p>And my goal is to have a list of choices when the above Json is deserialized and I have below test case</p>
  <pre><code>@Test
      public void testChoices(){
          ObjectMapper objectMapper = new ObjectMapper();
          String json = &quot;[ { \&quot;choiceId\&quot;: \&quot;1\&quot; }, { \&quot;choiceId\&quot;: \&quot;2\&quot;, \&quot;choiceType\&quot;: null } ]&quot;;
          
          List&lt;Choices&gt; choices = objectMapper.convertValue(json, new TypeReference&lt;List&lt;Choices&gt;&gt;() {
          });
          assertTrue(choices.get(0).getChoiceId().equals(&quot;1&quot;));
          assertTrue(choices.get(0).getChoiceType().equals(&quot;Yes&quot;));
          assertTrue(choices.get(1).getChoiceType().equals(&quot;2&quot;));
          assertNull(choices.get(1).getChoiceType());
      }
  </code></pre>
  <p>When I try to deserialize the below json. I have tried many solutions but still no luck, can someone please help me witht this?</p>
  <pre><code>Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Invalid definition for property `choiceType` (of type `com.onetrust.ds.request.dto.rest.Choices`): Could not find creator property with name 'choiceType' (known Creator properties: [choiceId])
   at [Source: UNKNOWN; line: -1, column: -1]
  </code></pre>