I am passing date as "scoreTimestamp": "2015-04-15T10:00:00.000Z",
And want to save this json as string in database so using method
ObjectMapper objMapper = new ObjectMapper();
String ratingData = objMapper.writeValueAsString(scoreTimestamp);
I want date to be as: "scoreTimestamp":"2015-04-15 10:00", where as objectMapper is converting this to :
"scoreTimestamp" : {
"year" : 2015,
"dayOfMonth" : 15,
"dayOfWeek" : 3,
"era" : 1,
"dayOfYear" : 105,
"monthOfYear" : 4,
"weekyear" : 2015,
"yearOfEra" : 2015,
"yearOfCentury" : 15,
"weekOfWeekyear" : 16,
"centuryOfEra" : 20,
"millisOfSecond" : 0,
"millisOfDay" : 36000000,
"secondOfMinute" : 0,
"secondOfDay" : 36000,
"minuteOfHour" : 0,
"minuteOfDay" : 600,
"hourOfDay" : 10,
"zone" : {
"fixed" : true,
"id" : "UTC"
},
Can somebody help me please?