code: def to_json_object(self):
      
      obj_dict = dict(namespace_start=self.namespace_start,
                      namespace_end=self.namespace_end)
      if self.app is not None:
        obj_dict['app'] = self.app
      return obj_dict
docs: Returns a dict representation that can be serialized to JSON.