code: def as_text(self, is_pretty=False):
          
          values = {'id': self._id, 'type': self._type}
          if self._owner:
              values['owner'] = self._owner
  
          if is_pretty:
              return json.dumps(values, indent=4, separators=(',', ': '))
  
          return json.dumps(values)
docs: Return the key as JSON text.