The object I am trying to convert to json has a number of attributes but I would like to print attributes with not null values only.
{ "ZIPCODE" : "45869", "TYPE2" : null, "POSTDIR2" : null, "PREDIR" : null, "LON" : null, "NUMBER" : null, "PREDIR2" : null, "LAT" : null, "POSTDIR" : null, "TLID" : null, "STREET" : null, "STREET2" : null, "ZIP" : "45869", "LINE2" : null, "STATE" : null, "ZIPEXTN" : null, "CITY" : null, "COUNTY" : null, "NAME" : null, "TYPE" : null } where I would like only:
{ "ZIPCODE" : "45869", "ZIP" : "45869" } I am trying to use jackson to do this without any success, any hints?