Skip to content

Commit

Permalink
fix: deserializing JSON with custom JSON name was incorrect
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Horton <paul.horton@owasp.org>
  • Loading branch information
madpah committed Jan 27, 2023
1 parent 8ca9e44 commit 7d4aefc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion serializable/__init__.py
Expand Up @@ -255,7 +255,7 @@ def _from_json(cls: Type[_T], data: Dict[str, Any]) -> object:
new_key = None
if decoded_k not in klass_properties:
for p, pi in klass_properties.items():
if pi.custom_names.get(SerializationType.JSON, None) == decoded_k:
if pi.custom_names.get(SerializationType.JSON, None) == k:
new_key = p
else:
new_key = decoded_k
Expand Down

0 comments on commit 7d4aefc

Please sign in to comment.