I have the following definition:
import org.joda.time.DateTime;
implicit val userInfoRead: Reads[UserInfo] = (
(JsPath \ "userName").readNullable[String] and
] (JsPath \ "startDate").readNullable[DateTime]
(UserInfo.apply _)
When passing the following JSON object:
"userInfo" : {
"userName": "joeuser",
"startDate": "2006-02-28"
}
When I check this data, I get the following error:
(/startDate,List(ValidationError(validate.error.expected.jodadate.format,WrappedArray(yyyy-MM-dd))))))
Any suggestions on what I am missing in formatting?
source
share