Reputation: 16524
I have a date in a json string (returned from an ASP.NET rest service) that looks like this: "created": "/Date(1277931782420-0700)/"
Jackson is not able to parse this date. I can write my own date format and pass it in to mapper.getDeserializationConfig().setDateFormat();
but i was wondering if there is an easier/better way to do this...
Upvotes: 2
Views: 1360
Reputation: 116472
I think defining date format is a reasonable way to do it. Alternatively you could define your own JsonDeserializer, register it, but it's not any simpler way (but may be more powerful if you need more complex parsing).
Upvotes: 2