title: how to post "Date" with POSTMAN JSON?
body: <p>Hello StackOverflow communitee, i'm trying to test my Ajax post request to set budgets with a starting date and an end date. </p>
  
  <p>Im able to set all the other values but unfortunately my dates are not pushed... Does anyone have an idea ? </p>
  
  <p>Im gonna put my JS AJAX request TEST, my postman and my JAVA Budget Class.</p>
  
  <p>Thanks again F.</p>
  
  <pre class="lang-java prettyprint-override"><code>package com.eBudget.eBudget;
  
  import java.sql.Date;
  import java.text.ParseException;
  import java.text.SimpleDateFormat;
  import java.time.LocalDate;
  import java.util.List;
  
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.ManyToMany;
  
  import org.hibernate.mapping.ForeignKey;
  
  import javax.persistence.Id;
  
  @Entity
  public class Budget {
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      public Integer idBudget;
      public String nom;
      public LocalDate datedeDebut;
      public Float valeur;
      public boolean etat;
      public Date datedeFin;
  
      @ManyToMany(mappedBy = "budgets")
      public List&lt;Users&gt; users;
  
      public Budget(Integer idBudget, String nom, LocalDate datedeDebut,
                    Float valeur, boolean etat, Date datedeFin, List&lt;Users&gt; users) {
          this.idBudget = idBudget;
          this.nom = nom;
          this.datedeDebut = datedeDebut;
          this.valeur = valeur;
          this.etat = etat;
          this.datedeFin = datedeFin;
          this.users = users;
      }
  
      public Budget() {
  
      }
  
      public Integer getIdBudget() {
          return idBudget;
      }
  
      public void setIdBudget(Integer idBudget) {
          this.idBudget = idBudget;
      }
  
      public String getNom() {
          return nom;
      }
  
      public void setNom(String nom) {
          this.nom = nom;
      }
  
      public LocalDate getDatedeDebut() {
          return datedeDebut;
      }
  
      public void setDatedeDebut(LocalDate datedeDebut) {
          this.datedeDebut = datedeDebut;
      }
  
      public Float getValeur() {
          return valeur;
      }
  
      public void setValeur(Float valeur) {
          this.valeur = valeur;
      }
  
      public boolean isEtat() {
          return etat;
      }
  
      public void setEtat(boolean etat) {
          this.etat = etat;
      }
  
      public Date getDatedeFin() {
          return datedeFin;
      }
  
      public void setDatedeFin(Date datedeFin) {
          this.datedeFin = datedeFin;
      }
  
      public List&lt;Users&gt; getUsers() {
          return users;
      }
  
      public void setUsers(List&lt;Users&gt; users) {
          this.users = users;
      }
  }
  
  </code></pre>
  
  <p>Postman Post Request</p>
  
  <pre class="lang-json prettyprint-override"><code>{ 
      "id":4,
      "nom":"Course3",
      "dateDebut":"2019-12-12",
      "valeur":200,
      "etat":true,
      "dateFin":"2020-01-01"
  }
  
  </code></pre>
  
  <p>Ajax request </p>
  
  <pre class="lang-js prettyprint-override"><code>&lt;script&gt;
  $("#formulaire").submit(function(e) {
      e.preventDefault();
  
      // 1ère etape test en dur //
      console.log("#valideBudget");
      var nom = "Course";
      var dateDebut = 2019 - 12 - 12;
      var valeur = 200;
      var etat = true;
      var dateFin = 2020 - 01 - 01;
      // faire un json//
      //2 creer un objet test//
      var budget = {};
      budget.id = 4;
      budget.nom = nom;
      budget.dateDebut = dateDebut;
      budget.valeur = valeur;
      budget.etat = etat;
      budget.dateFin = dateFin;
      console.log(budget);
      console.log("tg");
      console.log(JSON.stringify(budget));
      // test//
  
      //3 requete ajax//
  
      $.ajax({
          type: 'POST',
          // objet que je lui envoie //
          data: JSON.stringify(budget),
          contentType: "application/json; charset= utf-8",
          url: "http://localhost:8080/budget"
      }).done(function(data) {
          console.log("envoi effectuer");
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Result STATUS OK 200 on POSTMAN </p>
  
  <pre><code>{
      "idBudget": 12,
      "nom": "Course3",
      "datedeDebut": null,
      "valeur": 200.0,
      "etat": true,
      "datedeFin": null,
      "users": null
  }
  </code></pre>