title: Convert pojo (list of object) to json in java using jackson
body: <p>I'm facing a problem while converting simple JSON to POJO object.</p>
  
  <p>This is my code:</p>
  
  <pre><code>public class Products {
  
  private int id;
      private String type;
      private String description;
      private Double price;
      private String brand;
  
      public int getId() {
          return id;
      }
      public void setId(int id) {
          this.id = id;
      }
      public String getType() {
          return type;
      }
      public void setType(String type) {
          this.type = type;
      }
      public String getDescription() {
          return description;
      }
      public void setDescription(String description) {
          this.description = description;
      }
      public Double getPrice() {
          return price;
      }
      public void setPrice(Double price) {
          this.price = price;
      }
      public String getBrand() {
          return brand;
      }
      public void setBrand(String brand) {
          this.brand = brand;
      }
  }
  </code></pre>
  
  <p>Im getting below as output:</p>
  
  <pre><code>com.ObjectToJson.Product@b97c004
  Object to Json --&gt; {
  "products" : null
  }
  </code></pre>
  
  <p>I am not able to convert JSON to/from Java Objects using JACKSON API.</p>
  
  <p>Please, can anyone help me out on this?</p>