code: def to_json(self):
          
          return json.dumps(self.to_dict(), sort_keys=True, indent=2, separators=(',', ': '))
docs: Returns the options as JSON.
  
          :return: the object as string
          :rtype: str