From 836033358cb9d39334e470bb1a752cf9cd97c8dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Rafael=20Siqueira?= Date: Mon, 14 Jul 2025 17:26:20 -0300 Subject: [PATCH] remove encoder --- streams-events/app/utils.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/streams-events/app/utils.py b/streams-events/app/utils.py index 837d541..d16a123 100644 --- a/streams-events/app/utils.py +++ b/streams-events/app/utils.py @@ -1,7 +1,3 @@ -import decimal -import json -import math - import dictdiffer from arnparse import arnparse @@ -21,20 +17,3 @@ def diff(first: dict, second: dict) -> list[str]: changed.append(path) return changed - - -class JSONEncoder(json.JSONEncoder): - def default(self, o): - if isinstance(o, decimal.Decimal): - if o.is_nan(): - return math.nan - - if o % 1 != 0: - return float(o.quantize(decimal.Decimal('0.00'))) - - return int(o) - - if isinstance(o, set): - return list(o) - - return super().default(o)