/*
Deserialize object
331538
@SuppressWarnings("unchecked")
	public static Map<String,Object> deserializeMapFromFile(String filesystem, String filename) {
		Map<String,Object> map;
		if (filesystem.equals(HDFS)) {
			map = (Map<String,Object>) HDFSUtils.deserializeObjectFromFile(filename);
		}
		else {
			map = (Map<String,Object>) LocalFileSystemUtils.deserializeObjectFromLocalFile(filename);
		}
		return map;
	}
1058426
private Object _deserialize(Element element) throws ConverterException {
	String nodeName = element.getNodeName().toLowerCase();

	// NULL
	if (nodeName.equals("null")) {
	    return null;
	}
	// String
	else if (nodeName.equals("string")) {
	    return _deserializeString(element);
	    /*
	     * Node data=element.getFirstChild(); if(data==null) return "";
	     * 
	     * String value=data.getNodeValue();
	     * 
	     * if(value==null) return ""; return XMLUtil.unescapeXMLString(value);
	     */
	}
	// Number
	else if (nodeName.equals("number")) {
	    try {
		Node data = element.getFirstChild();
		if (data == null) return new Double(0);
		return Caster.toDouble(data.getNodeValue());
	    }
	    catch (Exception e) {
		throw toConverterException(e);
	    }
	}
	// Boolean
	else if (nodeName.equals("boolean")) {
	    try {
		return Caster.toBoolean(element.getAttribute("value"));
	    }
	    catch (PageException e) {
		throw toConverterException(e);

	    }
	}
	// Array
	else if (nodeName.equals("array")) {
	    return _deserializeArray(element);
	}
	// Component
	else if (nodeName.equals("component") || nodeName.equals("class")) {
	    return _deserializeComponent(element);
	}
	// Struct
	else if (nodeName.equals("struct")) {
	    return _deserializeStruct(element);
	}
	// Query
	else if (nodeName.equals("recordset")) {
	    return _deserializeQuery(element);
	}
	// DateTime
	else if (nodeName.equalsIgnoreCase("dateTime")) {
	    try {
		return DateCaster.toDateAdvanced(element.getFirstChild().getNodeValue(), timeZone);
	    }
	    catch (Exception e) {
		throw toConverterException(e);
	    }
	}
	// Query
	else if (nodeName.equals("binary")) {
	    return _deserializeBinary(element);
	}
	else throw new ConverterException("can't deserialize Element of type [" + nodeName + "] to a Object representation");

    }
1191516
function deserialize(str) {
  let dlen = 0;

  if (str.length < 8 || str.length > 90)
    throw new Error('Invalid bech32 string length.');

  while (dlen < str.length && str[(str.length - 1) - dlen] !== '1')
    dlen++;

  const hlen = str.length - (1 + dlen);

  if (hlen < 1 || dlen < 6)
    throw new Error('Invalid bech32 data length.');

  dlen -= 6;

  const data = Buffer.allocUnsafe(dlen);

  let chk = 1;
  let lower = false;
  let upper = false;
  let hrp = '';

  for (let i = 0; i < hlen; i++) {
    let ch = str.charCodeAt(i);

    if (ch < 0x21 || ch > 0x7e)
      throw new Error('Invalid bech32 character.');

    if (ch >= 0x61 && ch <= 0x7a) {
      lower = true;
    } else if (ch >= 0x41 && ch <= 0x5a) {
      upper = true;
      ch = (ch - 0x41) + 0x61;
    }

    hrp += String.fromCharCode(ch);
    chk = polymod(chk) ^ (ch >> 5);
  }

  chk = polymod(chk);

  let i;
  for (i = 0; i < hlen; i++)
    chk = polymod(chk) ^ (str.charCodeAt(i) & 0x1f);

  i++;

  while (i < str.length) {
    const ch = str.charCodeAt(i);
    const v = (ch & 0x80) ? -1 : TABLE[ch];

    if (ch >= 0x61 && ch <= 0x7a)
      lower = true;
    else if (ch >= 0x41 && ch <= 0x5a)
      upper = true;

    if (v === -1)
      throw new Error('Invalid bech32 character.');

    chk = polymod(chk) ^ v;

    if (i + 6 < str.length)
      data[i - (1 + hlen)] = v;

    i++;
  }

  if (lower && upper)
    throw new Error('Invalid bech32 casing.');

  if (chk !== 1)
    throw new Error('Invalid bech32 checksum.');

  return [hrp, data.slice(0, dlen)];
}
1348187
def deserialize(self, value, **kwargs):
        """"""
        kwargs.update({'trusted': kwargs.get('trusted', False)})
        if self.deserializer is not None:
            return self.deserializer(value, **kwargs)
        if value is None:
            return None
        output_list = [self.prop.deserialize(val, **kwargs)
                       for val in value]
        return self._class_container(output_list)
1105503
protected Object deserialize(byte[] in) {
        Object rv = null;
        try {
            if (in != null) {
                ByteArrayInputStream bis = new ByteArrayInputStream(in);
                ObjectInputStream is = new ObjectInputStream(bis);
                rv = is.readObject();
                is.close();
                bis.close();
            }
        } catch (IOException e) {
            logger.warn("Caught IOException decoding %d bytes of data", e);
        } catch (ClassNotFoundException e) {
            logger.warn("Caught CNFE decoding %d bytes of data", e);
        }
        return rv;
    }
894562
function __deserializeObjectStreaming(buffer, start, options) {
	let end = start;
	let dataView = new DataView(buffer);
	let endData = new Uint16Array(TYPE_HEADER.OBJECT_END);
	let data = {};
	while (start < buffer.byteLength) {
		let tmpType = dataView.getUint16(start, true);
		if (tmpType === endData[0]) {
			end += 2;
			break;
		}

		let subType, subKey, subData;
		({ anchor: start, value: subType } = __deserializeType(buffer, start, options));
		({ anchor: start, value: subKey } = __deserializeShortString(buffer, start, options));
		({ anchor: start, value: subData } = __deserializeData(subType, buffer, start, options));
		data[subKey] = subData;
		end = start;
	}
	return { anchor: end, value: data };
}
842768
protected Object jsonDeserialize(byte[] in, Class<?> cls) {
        if (in == null || in.length == 0) {
            return null;
        }
        Object res = null;
        try {
            res = JsonUtils.json2Object(new String(in, "utf-8"), cls);
        } catch (UnsupportedEncodingException e) {
            logger.error("DeSerialize object fail ", e);
        }
        return res;
    }
754036
def _deserialize(self, value, attr, data):
        """"""
        value = super(TrimmedString, self)._deserialize(value, attr, data)
        return value.strip()
1193458
function deserialize(Clazz, json) {
    /**
     * As it is a recursive function, ignore any arguments that are unset
     */
    if (hasAnyNullOrUndefined(Clazz, json)) {
        return void 0;
    }
    /**
     * Prevent non-json continue
     */
    if (!utils_1.isTargetType(json, 'object')) {
        return void 0;
    }
    /**
     * init root class to contain json
     */
    var instance = new Clazz();
    Object.keys(instance).forEach(function (key) {
        /**
         * get decoratorMetaData, structure: { name?:string, clazz?:{ new():T } }
         */
        var decoratorMetaData = getJsonProperty(instance, key);
        /**
         * pass value to instance
         */
        if (decoratorMetaData && decoratorMetaData.customConverter) {
            instance[key] = decoratorMetaData.customConverter.fromJson(json[decoratorMetaData.name || key]);
        }
        else {
            instance[key] = decoratorMetaData ? mapFromJson(decoratorMetaData, instance, json, key) : json[key];
        }
    });
    return instance;
}
835142
@Deprecated
    public void deserialize(Map data) throws ParseException {
        try {
            fromJson(JsonUtils.toJson(data));
        } catch (Exception e) {
            e.printStackTrace();
            throw new ParseException(e.getMessage(), -1);
        }
    }
161455
private function deserializeValue($value)
    {
        if (is_array($value) && isset($value['class']) && isset($value['payload'])) {
            return $this->deserializeObjectRecursively($value);
        } elseif (is_array($value)) {
            return $this->deserializeArrayRecursively($value);
        }

        return $value;
    }
1058402
private Object deserialize(TypeInfo type, Object rawValue)
            throws SerDeException {
        Object value = null;

        if (rawValue != null) {
            switch (type.getCategory()) {
                case PRIMITIVE:
                    value = deserializePrimitive((PrimitiveTypeInfo) type, rawValue);
                    break;
                case STRUCT:
                    value = deserializeStruct((StructTypeInfo) type, rawValue);
                    break;
                case MAP:
                    value = deserializeMap((MapTypeInfo) type, rawValue);
                    break;
                case LIST:
                    value = deserializeList((ListTypeInfo) type, rawValue);
                    break;
                case UNION:
                    value = deserializeUnion((UnionTypeInfo) type, rawValue);
                    break;
            }
        }

        return value;
    }
515812
@Override
    public T deserialize(String json) {
        ObjectMapper mapper = SequenceElement.mapper();
        try {
            T ret = (T) mapper.readValue(json, targetClass);
            return ret;
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
1095646
function __deserializeType(buffer, start, options) {
	let length = 2;
	let end = start + length;
	let type = null;

	
	if ( (buffer.byteLength - start) >= length ) {
		let typeData = new Uint8Array(buffer, start, length);
		Object.entries(TYPE_HEADER).forEach(([headerKey, headerVal]) => {
			let headerData = new Uint8Array(headerVal);
			if ((typeData[0] === headerData[0]) && (typeData[1] === headerData[1])) {
				type = headerKey.toLowerCase();
			}
		});
	}
	return { anchor: end, value: type };
}
406350
def deserialize(self, serialized):
        '''
        '''
        deserialized = json.loads(serialized)
        if deserialized.get('identifier') is None:
            return self._deserialize_v2(deserialized)
        else:
            return self._deserialize_v1(deserialized)
733647
public static JWEObject deserialize(String json) throws IOException {
        ObjectMapper mapper = new ObjectMapper();
        return mapper.readValue(json, JWEObject.class);
    }
507688
def deserialize(self, obj=None, ignore_non_existing=False):
    
    if not isinstance(obj, dict):
      if ignore_non_existing:
        return

      raise TypeError("Wrong data '{}' passed for '{}' deserialization".format(obj, self.__class__.__name__))

    definitions = {k: v for k, v in self.__class__.__dict__.items() if k[:1] != "_"}
    def_property_keys = set(definitions.keys())
    property_keys = set(obj.keys())

    existing_keys = def_property_keys & property_keys
    non_defined_keys = property_keys - def_property_keys
    non_existing_keys = def_property_keys - property_keys

    if not ignore_non_existing and non_defined_keys:
      raise TypeError(self.__class__.__name__ + " doesn't contain properties: {}".format(", ".join(non_defined_keys)))

    for k in existing_keys:
      v = obj[k]
      attr_type = definitions[k]

      try:
        if isinstance(attr_type, list) and self._isclass(attr_type[0], BaseView):
          if isinstance(v, list):
            obj_list = [attr_type[0](serialized_obj=v_item, ignore_non_existing=ignore_non_existing) for v_item in v]
          else:
            obj_list = [attr_type[0](serialized_obj=v, ignore_non_existing=ignore_non_existing)]

          self.__setattr__(k, obj_list)
        elif self._isclass(attr_type, BaseView):
          self.__setattr__(k, attr_type(v))
        else:
          self.__setattr__(k, v)
      except IndexError:
        self.__setattr__(k, v)  # check test_empty_view_deserialization test suite for test-case

    for k in non_existing_keys:
      attr_type = definitions[k]

      if attr_type is None:
        self.__setattr__(k, None)
      elif isinstance(attr_type, (list, set, tuple, dict)) and len(attr_type) == 0:
        self.__setattr__(k, attr_type.__class__())
      elif isinstance(attr_type, (list, set, tuple)) and self._isclass(attr_type[0], BaseView):
        self.__setattr__(k, attr_type.__class__())
      else:
        self.__setattr__(k, attr_type.__class__(attr_type))

    return self