docs: def to_json(self):
          """
          Returns a json representation
          """
          data = {}
          for k, v in self.__dict__.items():
              if not k.startswith('_'):
                  # values not serializable, should be converted to strings
                  if isinstance(v, datetime):
                      v = utils.datetime_to_string(v)
                  elif isinstance(v, date):
                      v = utils.date_to_string(v)
                  elif isinstance(v, uuid.UUID):
                      v = str(v)
                  elif isinstance(v, Decimal):
                      v = str(v)
                  data[k] = v
          return data