From 03b5796de8e85955f6b819ec531ac9f5d75f6180 Mon Sep 17 00:00:00 2001 From: Cristopher Pinzon Date: Fri, 29 Aug 2025 10:28:37 -0500 Subject: [PATCH] add custom encoder to persist_state --- localstack_snapshot/snapshots/prototype.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localstack_snapshot/snapshots/prototype.py b/localstack_snapshot/snapshots/prototype.py index e34945f..47f5b7c 100644 --- a/localstack_snapshot/snapshots/prototype.py +++ b/localstack_snapshot/snapshots/prototype.py @@ -120,7 +120,7 @@ def _persist_state(self) -> None: "recorded-content": self.observed_state, } full_state[self.scope_key] = recorded - state_to_dump = json.dumps(full_state, indent=2) + state_to_dump = json.dumps(full_state, indent=2, cls=CustomJsonEncoder) fd.seek(0) fd.truncate() # add line ending to be compatible with pre-commit-hooks (end-of-file-fixer)