code: def as_dictionary(self, is_proof=True):
          
          if self._created is None:
              self._created = DDO._get_timestamp()
  
          data = {
              '@context': DID_DDO_CONTEXT_URL,
              'id': self._did,
              'created': self._created,
          }
          if self._public_keys:
              values = []
              for public_key in self._public_keys:
                  values.append(public_key.as_dictionary())
              data['publicKey'] = values
          if self._authentications:
              values = []
              for authentication in self._authentications:
                  values.append(authentication)
              data['authentication'] = values
          if self._services:
              values = []
              for service in self._services:
                  values.append(service.as_dictionary())
              data['service'] = values
          if self._proof and is_proof:
              data['proof'] = self._proof
  
          return data
docs: Return the DDO as a JSON dict.
  
          :param if is_proof: if False then do not include the 'proof' element.
          :return: dict