Here's an excerpt from the Post class where you'll see our postDate Timestamp field. As is the case in many Distributed Applications, the Java Object on the client is a different Class object than the one sent, in this case a simplified object called Post. We retrieve the JsonPost object in a Web Client. We're passing an object called JsonPost from our Microservice with a postDate Timestamp field annotated the way we like it. Hint: It involves field annotations in the Client object. This post provides one possible solution. You're retrieving a JSON Object that contains a Java Timestamp datatype and when converting the object on the client you see something like the following:Ĭan not construct instance of from String value '01-18-2018 09:16:32': not a valid representation (error: Failed to parse Date value '01-18-2018 09:16:32': Can not parse date "01-18-2018 09:16:32": not compatible with any of standard forms ("yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", "EEE, dd MMM yyyy HH:mm:ss zzz", "yyyy-MM-dd")) Keywords: JSON, Jersey, Java, Microservices, Solution, Fix
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |