I am trying to convert JSON to Java object. When a certain value of a pair is null, it should be set with some default value.
null
Here is my POJO:
You can simply make a universal function that checks for null
model.SchoolName= stringNullChecker(model.SchoolName); public static String stringNullChecker(String val) { if (null == val) val = ""; return val; }