docs: def to_json(self):
          """Serialize an object to JSON based on its "properties" class
          attribute.
  
          :rtype: string"""
  
          j = {}
          for p in self.properties:
              j[p] = getattr(self, p)
  
          return json.dumps(j)