Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

yasoo

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yasoo - npm Package Compare versions

Comparing version
0.11.0
to
0.12.0
+1
-1
PKG-INFO
Metadata-Version: 2.1
Name: yasoo
Version: 0.11.0
Version: 0.12.0
Summary: Yet another serializer of objects

@@ -5,0 +5,0 @@ Home-page: https://github.com/drorvinkler/yasoo

@@ -9,3 +9,3 @@ import setuptools

name="yasoo",
version="0.11.0",
version="0.12.0",
author="Dror A. Vinkler",

@@ -12,0 +12,0 @@ description="Yet another serializer of objects",

Metadata-Version: 2.1
Name: yasoo
Version: 0.11.0
Version: 0.12.0
Summary: Yet another serializer of objects

@@ -5,0 +5,0 @@ Home-page: https://github.com/drorvinkler/yasoo

@@ -188,3 +188,11 @@ import json

if issubclass(real_type, Enum):
return obj_type(data[ENUM_VALUE_KEY])
value = data[ENUM_VALUE_KEY]
if isinstance(value, str):
try:
return real_type[value]
except KeyError:
for e in real_type:
if e.name.lower() == value.lower():
return e
return real_type(value)
elif issubclass(real_type, Mapping):

@@ -191,0 +199,0 @@ key_type = generic_args[0] if generic_args else None

@@ -150,3 +150,3 @@ import json

if isinstance(obj, Enum):
result = {ENUM_VALUE_KEY: obj.value}
result = {ENUM_VALUE_KEY: obj.name}
elif isinstance(obj, Mapping):

@@ -153,0 +153,0 @@ result = self._serialize_mapping(