0

How can I remove objects with null attributes? For example:

{  
   "login":"user.test",
   "dateTime":"02/07/2015 16:51",
   "action":"Update",
   "inner":{  
      "id":32,
      "name":"asdkjh",
      "other":"asdk",
      "document":"21321",
      "address":{  
         "zip":{  

         }
      },
      "email":{  

      }
   }
}

When I call writeValueAsString Jackson must ignore objects with null attributes, in this case address, zip and e-mail. Is it possible with some feature? Using setSerializationInclusion(Inclusion.NON_EMPTY) null values were ignored but the inner objects still there.

Leo
  • 93
  • 1
  • 2
  • 9

0 Answers0