OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
jsons
/
deserializers
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/16/2023 12:57:19 PM
rwxr-xr-x
📄
__init__.py
197 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:57:19 PM
rwxr-xr-x
📄
default_complex.py
1.17 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_date.py
556 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_datetime.py
881 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_decimal.py
586 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_defaultdict.py
980 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_dict.py
3.02 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_enum.py
1.24 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_iterable.py
1.16 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_list.py
2.41 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_mapping.py
947 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_nonetype.py
626 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_object.py
7.83 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_path.py
411 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_primitive.py
802 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_string.py
973 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_time.py
556 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_timedelta.py
463 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_timezone.py
535 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_tuple.py
3.45 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_union.py
1.26 KB
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_uuid.py
535 bytes
03/16/2023 12:57:19 PM
rw-r--r--
📄
default_zone_info.py
379 bytes
03/16/2023 12:57:19 PM
rw-r--r--
Editing: default_mapping.py
Close
from collections.abc import Mapping from typing import Mapping as MappingType from typish import get_args, get_origin from jsons.deserializers.default_dict import default_dict_deserializer def default_mapping_deserializer(obj: dict, cls: type, **kwargs) -> Mapping: """ Deserialize a (JSON) dict into a mapping by deserializing all items of that dict. :param obj: the dict that needs deserializing. :param cls: the type, optionally with a generic (e.g. Set[str]). :param kwargs: any keyword arguments. :return: a deserialized set instance. """ cls_ = Mapping cls_args = get_args(cls) if cls_args: cls_ = MappingType[cls_args] dict_ = default_dict_deserializer(obj, cls_, **kwargs) result = dict_ # Strip any generics from cls to allow for an instance check. if not isinstance(result, get_origin(cls)): result = cls(dict_) return result