for the given object -
{
"apiRequestType": "add",
"noOfTIDsRequired": "1",
"applicationId": "dxvfdv",
"posId": "1140475",
"midTidDetails": null
}
i get this -
"{\"apiRequestType\":\"add\",\"noOfTIDsRequired\":\"1\",\"applicationId\":\"dxvfdv\",\"posId\":\"1140475\",\"midTidDetails\":null}"
from -
objectMapper.writeValueAsString(inputMap))
but i want this -
"{ \"apiRequestType\": \"add\", \"noOfTIDsRequired\": \"1\", \"applicationId\": \"dxvfdv\", \"posId\": \"1140475\", \"midTidDetails\": null}"
can anyone suggest me how can I achieve my expected output using Jackson ObjectMapper. Or if any other library can be used then please suggest.