deserialize

negmas.serialization.deserialize(d: Any, deep=True, remove_type_field=True, keep_private=False, fallback_class_name: str | None = None, base_module: str = '', deep_ignore: bool = True, ignored_keys: tuple[str, ...] = (), python_class_identifier='__python_class__', type_marker: str = '__TYPE__:', path_marker: str = '__PATH__:', lambda_marker: bytes = b'__LAMBDAOBJ__:', function_marker: bytes = b'__FUNCTION_START__:', cloudpickle_marker: bytes = b'__CLOUDPICKLE_START__:', extra_paths: tuple[str | Path, ...] = (), extra_modules: tuple[str, ...] = (), type_name_adapter: Callable[[str], str] | None = None, path_adapter: Callable[[str], str] | None = None)[source]

Decodes a dict/object coming from serialize

Parameters:
  • d – The value to be decoded. If it is not a dict, it is returned as it is.

  • deep – If true, decode recursively

  • remove_type_field – If true the field called PYTHON_CLASS_IDENTIFIER will be removed if found.

  • keep_private – If given, private fields (starting with _) will be kept

  • fallback_class_name – If given, it is used as the fall-back type if ``PYTHON_CLASS_IDENTIFIER` is not in the dict.

  • ignored_keys – Keys to ignore

  • deep_ignore – if given, ignored keys are ignored in all components recusrively when deep is specified

Remarks:

  • If the object is not a dict or if it has no PYTHON_CLASS_IDENTIFIER field and no fallback_class_name is given, the input d is returned as it is. It will not even be copied.

See also

serialize, PYTHON_CLASS_IDENTIFIER