on ‎2019 Mar 18 1:58 PM
I know that JSON to Java object conversion can be achieved with 'com.fasterxml.jackson.databind.ObjectMapper'. But where this is happening as I wasn't able to find it in any of xml file?
I want to change parsing logic as this mapper is using SimpleDateFormat to convert string to date but I want to use my customer format.
Any suggestion how can I achieve this?
Request clarification before answering.
In spring-mvc-config.xml there is a list of message-converters. On MappingJackson2HttpMessageConverter you can set a custom ObjectMapper and on that mapper you can set the date formatter.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In case you are using OCC (commercewebservices):
I guess You may use custom data mappers to convert the JSON to DTO.
Please search For
"com.amaro.ecp.commercewebservices.mapping.mappers.CCPaymentInfoDataMapper"
Before that remove the mapping in dto-level-mapping-v2-spring.xml for that particular attribute.
And define the mapping in your custom data mapper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.