diff --git a/flytekit/interaction/click_types.py b/flytekit/interaction/click_types.py index 8cc2cc21cf..88200e30ce 100644 --- a/flytekit/interaction/click_types.py +++ b/flytekit/interaction/click_types.py @@ -308,7 +308,7 @@ def _parse(self, value: typing.Any, param: typing.Optional[click.Parameter]): if type(value) == dict or type(value) == list: return value try: - return json.loads(value) + return json.loads(json.dumps(value, default=lambda o: o.__dict__)) except Exception: # noqa try: # We failed to load the json, so we'll try to load it as a file