JSON Date object from REST web services
<p>I am producing json output from REST web services. I have two methods as below.</p>

<p>getProject() - Returns ProjectDO Java bean from Oracle DB
getAudit() - Returns AuditDO Java bean from Oracle DB</p>

<p>Here problem is, the json format of ProjectDO bean returns the Date attribute as <strong>{"date_modified":"2013-05-14"}</strong>, but the json format of AuditDO  bean returns the Date attribute as <strong>{"date_modified":"2016-03-14T00:00:00"}</strong></p>

<p>I want <strong>{"date_modified":"2013-05-14"}</strong> format. How can I change this format.</p>

<p>Below is the Project Bean </p>

<pre><code>public Date date_modified;

public Date getDate_modified() {
    return date_modified;
}
public void setDate_modified(Date date_modified) {
    this.date_modified = date_modified;
}
</code></pre>

<p>Below is the Audit Bean
    public Date date_modified;</p>

<pre><code>public Date getDate_modified() {
    return date_modified;
}
public void setDate_modified(Date date_modified) {
    this.date_modified = date_modified;
}
</code></pre>