code: def json_filter(self):
          
          return lambda obj: dict((k, v) for k, v in obj.__dict__.items()
                                  if not k.startswith('_') and getattr(obj, k) is not None)
docs: filter out properties that have names starting with _
          or properties that have a value of None