Unpack `body` replace it by the result.
777705
def _unpack_body(self):
        """"""
        obj = self._get_body_instance()
        obj.unpack(self.body.value)
        self.body = obj
742317
def Unpack(self, msg):
    """"""
    descriptor = msg.DESCRIPTOR
    if not self.Is(descriptor):
      return False
    msg.ParseFromString(self.value)
    return True
89209
def _unpack_result(klass, result):
        ''''''

        result = result.unpack()

        # to be compatible with standard Python behaviour, unbox
        # single-element tuples and return None for empty result tuples
        if len(result) == 1:
            result = result[0]
        elif len(result) == 0:
            result = None

        return result
80209
def unpack(tokens):
    """"""
    logger.log_tag("unpack", tokens)
    if use_computation_graph:
        tokens = evaluate_tokens(tokens)
    if isinstance(tokens, ParseResults) and len(tokens) == 1:
        tokens = tokens[0]
    return tokens
302138
def to_body(self):
        """"""
        body = [self.code, 0x00, self.ctl1, self.ctl2,
                (self.src_addr >> 8) & 0xff, (self.src_addr >> 0) & 0xff,
                (self.dst_addr >> 8) & 0xff, (self.dst_addr >> 0) & 0xff]
        if self.dptsize == 0 and (len(self.data) == 1) and ((self.data[0] & 0xC0) == 0):
            # less than 6 bit of data, pack into APCI byte
            body.extend([1, (self.tpci_apci >> 8) & 0xff,
                         ((self.tpci_apci >> 0) & 0xff) + self.data[0]])
        else:
            body.extend([1 + len(self.data), (self.tpci_apci >> 8) &
                         0xff, (self.tpci_apci >> 0) & 0xff])
            body.extend(self.data)

        return body
388794
function unpack(body, callback) {
	   xmlToJs(body, function(err, result) {
		   if (err) return callback(err);
		   // Keep a reference to the magic enveloppe
		   var me = result;
		   // Decode the activity entry from the enveloppe
		   var entry = Ostatus.salmon.base64url_decode(result.data);
		   // Parse the entry XML to JSON
		   Ostatus.as.parseEntry(entry, function(err, result) {
			   if (err) return callback(err);
			   // Keep a reference to the JSON activity
    		   var activity = result;
    		   // We need an actor URI to validate the signature
    		   if (activity.actor == undefined && activity.actor.uri == undefined) {
    			   return callback(new Error("Missing actor URI in activity entry"), false, activity);
    		   }
    		   // Keep a reference to the actor uri
			   var uri = activity.actor.uri;
			   // Webfinger to retrieve the actor public key
			   Ostatus.webfinger.lookup(uri, function(err, result) {
				  if (err) return callback(err, false, activity);
				  // Lookup the key from the webfinger JRD
				  var key = _grabKey(result);
				  if (!key) return callback(new Error("Could not find a key in user XRD"), false, activity);
				  // We need the second part of the key
				  key = key.href.split(',');
				  // Verify the signature (synchronous)
				  var result = Ostatus.salmon.verify_signature(me, key[1]);
				  return callback(false, result, activity);
			   });
		   });
	   });
}
887862
def process_result(self, context, result_body, exc, content_type):
        
        return process_result(self, context, result_body, exc, content_type)
510448
def clean_comment_body(body):
    
    body = _parser.unescape(body)
    body = re.sub(r'<a [^>]+>(.+?)</a>', r'\1', body)
    body = body.replace('<br>', '\n')
    body = re.sub(r'<.+?>', '', body)
    return body
632254
def unpack(self, key, value):
        """"""
        value, freshness = value
        if not self.is_fresh(freshness):
            raise KeyError('{} (stale)'.format(key))
        return value
672191
def _clean_result(self, text):
        """"""
        text = re.sub('\s\s+', ' ', text)
        text = re.sub('\.\.+', '.', text)
        text = text.replace("'", "\\'")
        return text
436549
def _parse_body(self, body):
    
    if is_python3():
      return json.loads(body.decode('UTF-8'))
    else:
      return json.loads(body)
997365
function remakeBody (body, bodyType) {
  return blobUtil
    .base64StringToBlob(body)
    .then(function (blob) {
      switch (bodyType) {
        case BodyTypes.ARRAY_BUFFER:
          return blobUtil.blobToArrayBuffer(blob)
        case BodyTypes.BLOB:
          return blob
        case BodyTypes.FORM_DATA:
          throw new Error('Cannot make FormData from serialised Request')
        case BodyTypes.JSON:
          return blobToString(blob)
            .then(function (str) {
              return JSON.parse(str)
            })
        case BodyTypes.TEXT:
          return blobToString(blob)
        default:
          throw new Error('Unknown requested body type "' + bodyType + '"')
      }
    })
}
572817
def _unpack(self, content):
        """"""
        if self.compressor:
            try:
                content = self.compressor.decompress(content)
            except CompressError:
                pass
        if self.serializer:
            content = self.serializer.deserialize(content)
        return content
1152841
def unpack(data):
    ''''''
    size, position = decoder._DecodeVarint(data, 0)
    envelope = wire.Envelope() 
    envelope.ParseFromString(data[position:position+size])
    return envelope
327785
def decode(raw):
    """"""
    return raw \
        .replace(bytes([SLIP_ESC, SLIP_ESC_END]), bytes([SLIP_END])) \
        .replace(bytes([SLIP_ESC, SLIP_ESC_ESC]), bytes([SLIP_ESC]))
769735
def unpack(self, buff, offset=0):
        """"""
        super().unpack(buff)

        class_name = self._get_body_class()
        buff = self.body.value
        self.body = FixedTypeList(pyof_class=class_name)
        self.body.unpack(buff)
576189
def unpack(fmt, arg):
    """"""

    if isinstance(arg, bytearray) and not (sys.version_info >= (2, 7, 5)):
        return struct.unpack(fmt, str(arg))

    return struct.unpack(fmt, arg)