title: Getting around Json jackson and lombok constructor requirements
body: <p>Using json to save and load data requires a constructor for json to load the object, and I'm having trouble getting lombok annotations to work with this. What should I do?</p>
  
  <p>This is what my class looked like before and after attempting to use an annotation to construct my item:</p>
  
  <pre><code>@Data
  public class Item { //before
  
      private int id;
  
      private int amount;
  
      public Item(@JsonProperty("id") int id, @JsonProperty("amount") int amount) {
          this.id = id;
          this.amount = amount;
      }
  
  }
  </code></pre>
  
  <pre><code>@Data
  @AllArgsConstructor 
  @NoArgsConstructor //I don't want this here as it could cause complications in other places.  But json requires I have this...
  public class Item { //after
  
      private int id;
  
      private int amount;
  
  }
  </code></pre>
  
  <p>I don't want to use the NoArgsConstructor annotation by lombok as I don't want a no args constructor for this class. I realise that I could do this:</p>
  
  <pre><code>private Item() {
  }
  </code></pre>
  
  <p>But was hoping there is a better way...</p>