I am trying to get an empty string instead of null in the response from a HTTP rest controller in a Spring Boot Web project.
The return code is as follows: an ArrayNode class wrapped into ResponseEntity
return new ResponseEntity<>(result, HttpStatus.OK);
The image below shows that it is a NullNode in the response and the second image shows the response in Postman. I would like the contactNumber field to be empty string instead of null.
question from:
https://stackoverflow.com/questions/66060765/return-empty-string-instead-of-null-in-springboot-web-response 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…