Currently my application has a class which is as below
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Employee {
Department department;
String firstName;
String lastName;
String address;
String phoneNumber;
}
I am capturing the employee object inside the logs where I am converting the object into JSON. I am able to convert the object to JSON but the null values do not get into the JSON.
Currently my application has a class which is as below
I am capturing the employee object inside the logs where I am converting the object into JSON. I am able to convert the object to JSON but the null values do not get into the JSON.
I have tried the below
But not able to get the null values of the fields in JSON. How do I get them?