0

I have a JSON as below

{
"userName" : "FOOO",
"createdDate" : "2014-10-16"
}

and i am using spring couche base API and created a bean as follows

@Document
public class MBean
{
@Id
private String userName;
@Field
private java.util.Date  createDate;

//Getters and Setters for above 2 instance variables
}

and now when i tried to make a REST call using RestClient, createdDate data which is in JSON (2014-10-16) is not populated in my bean class instance variable "createDate",

and in the http://docs.spring.io/spring-data/couchbase/docs/1.1.0.RC1/reference/htmlsingle/ it says automatic conversions happens, but not working for me.

Daan
  • 2,680
  • 20
  • 39
Ravi Kiran Y
  • 181
  • 1
  • 2
  • 4

1 Answers1

0

After doing some backward engineering we found that we need to provide data in the below format

YYYY-MM-DDTHH:mm:ss:mmm

Ex:

2014-10-16T14:41:21.149
Ravi Kiran Y
  • 181
  • 1
  • 2
  • 4